This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFA: Support -Wmissing-declarations in C++

Gabriel Dos Reis <> writes:

> | What do you think of this version of the patch?
> Does it handle the following correctly (e.g. no warning)?

Thanks for the test case.  My patch does not give any warnings for it
when -Wmissing-declarations is used.

> | (I will try to say again what I tried to say earlier: this warning is
> | for a particular coding style.  If you don't use that coding style,
> | then don't use this warning.  gcc has dozens of warnings.  I think
> | it's silly to argue that each warning not included in -Wall
> | constitutes a moral hazard.  People who enable warnings get what they
> | asked for.)
> The trouble with that reasoning is that it does not match reality.
> People who use coding style switches mechanically enforced by the
> compiler don't think they deserve what they get. Another trouble is
> that they tend to act like viruses and spread through third-party
> libraries forcing people to code in particular way, even when that
> does not just make sense (refer to my previous messages as to how that
> spreads).  Please again consider -Weffc++ to see what I mean.
> What would be silly is that we do not think interactions with
> idiomatic constructs carefully through.

Thank goodness people don't read the documentation to discover
warnings like -Wdisable-optimization or -Woverlength-strings.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]