This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/38789] [4.4 Regression] __builtin_constant_p appears to eveluate to true for non-constant arguments.



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-01-09 21:51 -------
I wouldn't consider this a bug.  It's similar to

inline void foo(int i) { if (__builtin_constant_p (i)) you_loose(); }

void bar()
{
  foo (1);
  foo (2);
}

where the code is duplicated twice and both cases are constant.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38789


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]