Sujet : Re: Which code style do you prefer the most?
De : rakinar2 (at) *nospam* onesoftnet.eu.org (Ar Rakin)
Groupes : comp.lang.cDate : 27. Feb 2025, 13:56:55
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87a5a7k0ko.fsf@onesoftnet.eu.org>
References : 1 2 3 4 5 6
User-Agent : Gnus/5.13 (Gnus v5.13)
bart <
bc@freeuk.com> writes:
// isn't devoid of quirks (this is still C after all), for example:
>
fopen(file,"rb"); // open file in \windows\system32\
fread(...);
>
Here, the // line continues onto the next, so that the fread is
commented out. But they are fewer.
Interesting. Isn't this considered a compiler bug? I am aware that you
can do the same thing with strings like this:
fprintf(stderr, "multi\
line\
strings\
are fun.");
I can understand how this might be useful; but with *comments*?? Was
that actually a thing in the official C standards?
To me it just feels like a compiler bug that was never fixed. Because
allowing backslashes `\' to escape comments is just weird.
-- Rakin