This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C99 usage in gcc
Neil Booth <neil@daikokuya.co.uk> writes:
> Zack Weinberg wrote:-
>
>> Neil Booth <neil@daikokuya.co.uk> writes:
>>
>> > In 3.4 we permit the unmatched ' because of many complaints, so
>> > perhaps we should conditionalize the // warnings on !skipping.
>> > I'd be OK with that.
>>
>> I'd be OK with that too. I can think of cases where the meaning of
>> the program silently changes but they're all pretty pathological.
>
> With my proposal we're only changing the issuance of a diagnostic,
> not semantics.
I'm clearly not explaining this right.
Whether or not // comments are removed in skipped conditional blocks
can affect the meaning of the program, but only under pathological
conditions: for instance
#if 0
// oops \
#endif
The warning doesn't try to detect those; it just triggers for any
occurrence of "//" in the source code. By silencing this warning
we *may* fail to issue any diagnostics in such cases. (There are
other warnings that may trigger instead.) However, since this is
not a problem for normal code, I think this is fine.
zw