Commit ad2ad698 authored by Tom Lane's avatar Tom Lane

Tweak compiler version cutoff for no_sanitize("alignment") support.

Buildfarm results show that gcc up through 7.x produces annoying
warnings for this construct (and, presumably, wouldn't do the right
thing anyway).  clang seems okay with the cutoff we have, though.

Discussion: https://postgr.es/m/CAPpHfdsne3%3DT%3DfMNU45PtxdhSL_J2PjLTeS8rwKnJzUR4YNd4w%40mail.gmail.com
Discussion: https://postgr.es/m/475514.1612745257%40sss.pgh.pa.us
parent ae4867ec
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
* Testing can be done with "-fsanitize=alignment -fsanitize-trap=alignment" * Testing can be done with "-fsanitize=alignment -fsanitize-trap=alignment"
* on clang, or "-fsanitize=alignment -fno-sanitize-recover=alignment" on gcc. * on clang, or "-fsanitize=alignment -fno-sanitize-recover=alignment" on gcc.
*/ */
#if __clang_major__ >= 7 || __GNUC__ >= 5 #if __clang_major__ >= 7 || __GNUC__ >= 8
#define pg_attribute_no_sanitize_alignment() __attribute__((no_sanitize("alignment"))) #define pg_attribute_no_sanitize_alignment() __attribute__((no_sanitize("alignment")))
#else #else
#define pg_attribute_no_sanitize_alignment() #define pg_attribute_no_sanitize_alignment()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment