Re: Could -Wall add on -Wundef by default ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2 Mar 2019 at 13:42, Jonny Grant wrote:
> >> Perhaps just adding to -Wextra would make sense?
> >
> > I would still be strongly against that. Why can't you just use
> > -Wundef, instead of forcing everybody else to change their code to
> > follow your preferred convention?
>
> Yes, we use it. Presumably someone decided what should go into -Wextra,
> and presumably it is things that are worth adding... in my view it's
> worth adding. No worries if that isn't consensus though! :)

-Wundef is only useful if your code always does:

#if defined(MACRO) && MACRO

instead of just #if MACRO.

They are both perfectly valid ways to write your code. People who are
happy to write the latter should not have to deal with warnings that
are only useful to people who write the former.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux