howto stop gcc to blame: error: ‘no_sanitize’ attribute directive ignored [-Werror=attributes]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I use sanitizer and switch from "debug" to "release" build but NOW the build is broken with:

.../msgque.h|2993 col 1| error: ‘no_sanitize’ attribute directive ignored [-Werror=attributes]
||  MQ_EXTERN bool MQ_DECL MqEnvCheck(MQ_MNG const mng);
||  ^~~~~~~~~

the code is:

/// check if a \RCAPI{MNG} pointer is a \rcapi{ObjectS}
__attribute__((no_sanitize("address")))
MQ_EXTERN bool MQ_DECL MqEnvCheck(MQ_MNG const mng);

I already tried

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"

but this does NOT help…

1. have someone the TRICK to silence gcc ONLY for
"__attribute__((no_sanitize("address")))"

2. Why does the warning/error message does NOT include the steps to silence this?
   -> I miss at least the right "diagnostic ignored" argument.


;mf




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux