This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Code Required Compiler Options
- From: carnellr <carnellr at battelle dot org>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 31 Oct 2009 11:07:56 -0700 (PDT)
- Subject: Code Required Compiler Options
I have some code that requires the command line option -fno-strict-aliasing
to be set when using -O2 optimization or the optimizer will silently cause
the code to return unexpected results.
Because other people may compile these functions into their code, I would
like to be sure that they use the correct command line options when
compiling.
Is there a way to require that -fno-strict-aliasing be set when compiling
through the use of pragmas? I would like an error to be thrown at compile
time if it is not set. Something like #pragam require -fno-strict-aliasing
would be nice.
Thanks for your help,
Rob
--
View this message in context: http://old.nabble.com/Code-Required-Compiler-Options-tp26144636p26144636.html
Sent from the gcc - Help mailing list archive at Nabble.com.