[Bug c/39134] front end does not reject sizeof on function types

christopherhe at trentu dot ca gcc-bugzilla@gcc.gnu.org
Sun Jul 20 14:12:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39134

Chris Hennick <christopherhe at trentu dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christopherhe at trentu dot ca

--- Comment #2 from Chris Hennick <christopherhe at trentu dot ca> ---
Shouldn't it at least raise a warning, even using the default invocation? To
me, a positive sizeof(x) implies that x is an object that can be moved and
copied, and from what I've read, some novice programmers seem to expect that to
be true for compiled and loaded functions.

Of course, an alternative would be to actually compile/link all sizeof'd
functions in such a way that they *could* be moved and copied...



More information about the Gcc-bugs mailing list