Index: libcfa/src/vec/vec.hfa
===================================================================
--- libcfa/src/vec/vec.hfa	(revision c62013ecf0b07694154ca3cbdff83310eedb1dd9)
+++ libcfa/src/vec/vec.hfa	(revision ceb4cc1ed7cb63e19737c8b384cc214d9857a6c3)
@@ -118,7 +118,9 @@
 	}
 
+	#if __GNUC__ >= 12									// valid GNU compiler diagnostic ?
 	#pragma GCC diagnostic push
 	// FIX ME: false positive with gcc > 11, so disable.
 	#pragma GCC diagnostic ignored "-Wdangling-pointer"
+	#endif // __GNUC__ >= 12
 
 	// Refract incident vector v with respect to surface with normal n eta is the ratio of indices of refraction between
@@ -136,5 +138,7 @@
 	}
 
+	#if __GNUC__ >= 12									// valid GNU compiler diagnostic ?
 	#pragma GCC diagnostic pop
+	#endif // __GNUC__ >= 12
 
 	// Given a perturbed normal and a geometric normal, flip the perturbed normal if the geometric normal is pointing
