ejolson wrote: ↑Mon Oct 10, 2022 8:09 pm
According to Fido, compilers should never peek inside the comments. What's inside should be reserved for only dogs to read. Although I disagree with part of that, I find including compiler directives inside magic comments more likely to go wrong than having a standard syntax for preprocessor and #pragma directives.
Its nothing to do with compilers as such.
This started long ago (probably 45 years ago or so) when static code analysis tools such as lint allowed users to provide extra information such as /*notreached*/ or /*fallthrough*/ to clarify their intentions.
This idea worked well because compilers simply ignored the comments.
More recently compilers do a decent job of static analysis (see -fanalyzer especially), and so such annotation has again become useful.
Simple compilers will, as before, ignore them.