http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56650
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
CC| |burnus at gcc dot gnu.org
Summary|Odd error messages with |Odd error messages with
|C_SIZEOF |C_SIZEOF for valid code
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-03-18
09:22:34 UTC ---
Note that the code is VALID. "c_sizeof" is a specification inquiry:
"A specification inquiry is a reference to [...] (4) the function C_SIZEOF from
the intrinsic module ISO C BINDING (15.2.3.7), or [...]"
(F2008, "7.1.11 Specification expression")
And those are allowed in constant expressions:
"(4) a specification inquiry where each designator or function argument is
(a) a constant expression or
(b) a variable whose properties inquired about are not
(i) assumed,
(ii) deferred, or
(iii) defined by an expression that is not a constant expression,"
(F2008, "7.1.12 Constant expression")