Date: Fri, 27 Jun 2025 09:16:55 +0200
On Thursday, 26 June 2025 23:04:52 Central European Summer Time Jonathan
Wakely via Std-Proposals wrote:
> A tool built using libclang doesn't need to be a compiler either, so
> there's nothing contrary to the standard that says it can't see comments.
> You could use it to build a preprocessor, in which case obviously it needs
> to see the original source
There's nothing that says the compiler can't see them either. The Standard
only says that they have no influence in code syntax, but compilers do warn
about things perfectly well-allowed by the standard. How long is it going to
be until compilers apply some AI and warn "your code doesn't match your
comment" or "you should document this function"
BTW, didn't GCC have support for
// fallthrough
comments in falling-through switch cases?
Wakely via Std-Proposals wrote:
> A tool built using libclang doesn't need to be a compiler either, so
> there's nothing contrary to the standard that says it can't see comments.
> You could use it to build a preprocessor, in which case obviously it needs
> to see the original source
There's nothing that says the compiler can't see them either. The Standard
only says that they have no influence in code syntax, but compilers do warn
about things perfectly well-allowed by the standard. How long is it going to
be until compilers apply some AI and warn "your code doesn't match your
comment" or "you should document this function"
BTW, didn't GCC have support for
// fallthrough
comments in falling-through switch cases?
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Platform & System Engineering
Received on 2025-06-27 07:17:24