[Bug c++/19628] [3.4/4.0 Regression] g++ no longer accepts __builtin_constant_p in constant-expressions

austern at apple dot com gcc-bugzilla@gcc.gnu.org
Mon Jan 31 02:38:00 GMT 2005


------- Additional Comments From austern at apple dot com  2005-01-31 02:38 -------
Subject: Re:  [3.4/4.0 Regression] g++ no longer accepts __builtin_constant_p in constant-expressions

> it checks for built-ins that can appear in consant-expressions, but 
> the name
> might seem to refer exclusively to __builtin_constant_p.  A name like
> "builtin_valid_in_constant_expr_p" would seem better.

I agree, that's a better name.  I'll change it.

> (Matt, I think you should also check what happens when 
> __builtin_constant_p is
> used as a template argument with dependent arguments, like:
>   template <int I>
>   void f(int &[__builtin_constant_p (I) + 2]);

Actually, it ICEs.  That would be a regression.  I think I'd better fix 
it before checking this in.

             --Matt



-- 


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



More information about the Gcc-bugs mailing list