This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: questionable C error message for aggregate initializers?
Joseph S. Myers wrote:
> Re-read the standard more carefully. 6.7.8#13 lists two alternatives and
> the one that applies in this case is a single expression of compatible
> type. That then fails under the constraint of 6.7.8#4, since the
> expression doesn't meet the requirements of 6.6 for constant expressions,
> and the error message is appropriate for 6.7.8#4.
>
> --
> Joseph S. Myers
> jsm28@cam.ac.uk
>
Sorry, the four lines were the whole file. acv2 has external linkage
(6.2.2#5 2nd sentence), so it has static storage duration (6.2.4#3).
6.7.8#13 ist not applicable, because it deals only with objects having
automatic storage duration.
Regards,
Ulrich Kunitz
--
Ulrich Kunitz (gefm21@uumail.de)