Liste des Groupes | Revenir à cl c |
Michael S <already5chosen@yahoo.com> writes:
On Wed, 09 Apr 2025 13:14:55 -0700
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
[may trailing commas in argument lists be accepted, or
must they be rejected?]
It is required in the sense that it is a syntax error,>
and syntax errors require a diagnostic.
>
Trailing commas in argument lists and/or parameter lists
could be accepted as an extension, even without giving a
diagnostic as I read the C standard, but implementations
are certainly within their rights to reject them.
I have no doubts that implementations have full rights to reject
them. The question was about possibility to accept them and
especially about possibility to accept without diagnostics.
So, it seems, there is no consensus about it among few posters
that read the relevant part of the standard.
I don't think anyone should care about that. If there were any
significant demand for allowing such trailing commas then someone
would implement it, and people would use it even if in some
technical sense it meant that an implementation supporting it
would be nonconforming.
Besides, the opinions of people posting
in comp.lang.c carry zero weight; the only opinions that matter
are those of peole on the ISO C committee, and the major compiler
writers, and none of those people bother posting here.
Les messages affichés proviennent d'usenet.