[ECOS] Re: casts to a type other than an integral or enumeration type in a constant-expression

Nathan Sidwell nathan@codesourcery.com
Thu Feb 13 13:56:00 GMT 2003

Jonathan Larmour wrote:

> Indeed it's like that. But the whole thing is cast to an int, so the 
> expression as a whole has integral type. From the C++ standard 6.4.2 
> para 2 that's all that's required, the way I read it. Having a 
> non-integral type in an intermediate stage should make no difference.
you are incorrect. [5.19] says quite clearly what an integral constant
expression can involve. A cast to a function pointer is not one of them.


Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
          The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

More information about the Gcc-bugs mailing list