Joseph Myers via Gcc <gcc@gcc.gnu.org> writes:

> One issue that showed up as test failures with a default of -std=gnu23 is 
> that -std=gnu23 -Wtraditional produces a "traditional C rejects ISO C 
> style function definitions" warning for function definitions with empty 
> parentheses, as they are treated like (void) in C23, so resulting in 
> failure of several -Wtraditional tests.
>
> Clearly that's a bug (that warning should only be given for literal 
> (void), not for () meaning (void)) and wouldn't be hard to fix.  But is 
> there actually any current use for the -Wtraditional option?  It seems 
> extremely unlikely now that compatibility with pre-C89 compilers would be 
> relevant.  So maybe it would make more sense to remove -Wtraditional 
> support (remove all the logic implementing the option, make it an option 
> marked with Ignore in c.opt to do nothing so as not to break any build 
> systems that hardcode this option) rather than fixing this bug with an 
> option that's probably no longer useful.

Given the other messages in the thread, I'd like to share some anecdotal
data:
* I see 0 instances of -Wtraditional appearing in my cache of build
logs;

* I see 0 non-trivial (e.g. comments or bundled autoconf macros)
references to -Wtraditional in my collection of repositories;

* There are some, but not many, references on Debian code search:
  <https://codesearch.debian.net/search?q=Wtraditional&literal=1&perpkg=1>.
  
  Note that a chunk of the references are the kind of macros I
  mentioned, copies of GCC, or NEWS/ChangeLogs;
  
* Not to say that such warnings are useless to ever attempt, but people
  who need compatibility with such compilers should really test with
  them anyway, so this is merely a convenience thing. It's not like it
  actually guarantees such compilers will work (to give another example,
  -std=gnu89 still lets you use headers which weren't in C89).

Reply via email to