Index: libcfa/src/vec/vec.hfa
===================================================================
--- libcfa/src/vec/vec.hfa	(revision a12816e7af641f0a6acf1c6966bea34f36cf8f7f)
+++ 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
Index: tests/enum_tests/planet.cfa
===================================================================
--- tests/enum_tests/planet.cfa	(revision a12816e7af641f0a6acf1c6966bea34f36cf8f7f)
+++ tests/enum_tests/planet.cfa	(revision ceb4cc1ed7cb63e19737c8b384cc214d9857a6c3)
@@ -37,9 +37,15 @@
 //	Planet rp = fromInt( prng( countof( Planet ) ) );	// select random orbiting body
 
+	#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
+
 	Planet rp = fromInt( countof( Planet ) - 1 );		// non-random for test suite
+
+	#if __GNUC__ >= 12									// valid GNU compiler diagnostic ?
 	#pragma GCC diagnostic pop
+	#endif // __GNUC__ >= 12
 
 	choose( rp ) {										// implicit breaks
