This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52632] GCC compfail on O0
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Mar 2012 08:27:13 +0000
- Subject: [Bug c/52632] GCC compfail on O0
- Auto-submitted: auto-generated
- References: <bug-52632-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52632
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-21 08:27:13 UTC ---
Yes. Actually, with __builtin_constant_p, it does so pretty often.
Starting from trivial int foo () { int a; a = 1; return __builtin_constant_p
(a); }
or when __builtin_constant_p is used in an inline function on its arguments or
expressions involving those arguments (then it even depends on whether the
compiler decides to inline or clone the function or not).
BTW, for GCC 4.3+ kernel.h could very well use the __attribute__((error
("message"))).