This is the mail archive of the gcc-patches@gcc.gnu.org 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 2/2] PR c/68187: fix overzealous -Wmisleading-indentation (comment #1)


On Fri, Mar 04, 2016 at 01:53:20PM +0100, Bernd Schmidt wrote:
> On 03/03/2016 06:15 PM, Patrick Palka wrote:
> >Cool, this also fixes the false-positives seen in bdwgc, whose coding
> >style suggests indenting things inside an #ifdef as if it were an
> >if(), e.g.:
> >
> >     if (a)
> >       foo ();
> >#   ifndef A
> >       bar ();
> >#   endif
> >     ...
> 
> Once again I find myself thinking this is not a false positive, but terrible
> code we should warn for.

I agree.  It seems entirely sane to warn here.

	Marek


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