This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [ECOS] Re: casts to a type other than an integral or enumerationtype in a constant-expression
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
--
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