NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/57723: -Wmisleading-indentation can warn incorrectly
The following reply was made to PR toolchain/57723; it has been noted by GNATS.
From: Mouse <mouse%Rodents-Montreal.ORG@localhost>
To: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, toolchain-manager%NetBSD.org@localhost,
gnats-admin%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Subject: Re: toolchain/57723: -Wmisleading-indentation can warn incorrectly
Date: Fri, 24 Nov 2023 15:19:39 -0500 (EST)
>> gcc -Wmisleading-indentation warns about certain
>> correctly-indented statements. [...]
> This looks like a matter with gcc in general, not with NetBSD's
> version of it, no?
I would tend to assume so, yes, but I haven't verified (which is one
reason I sent-pr instead of trying to figure out how to report it to
the gcc people). Is it incorrect to send-pr for such things? I
thought that was the correct thing to do, with the NetBSD compiler
people doing triage and kicking those for which it's appropriate
upstream.
> (In NetBSD's source code, this style is against KNF, so it _would_ be
> appropriate to warn about this code, although that's not quite the
> nature of what's happening here.)
Well, for one thing, the compiler does this even for non-NetBSD code,
for which KNF is not relevant unless the user wants it to be. For
another, it's not warning "against KNF"; it's warning "misleading
indentation".
If it required -Wmisleading-indentation to get it, I'd object less (I'd
still object, because the indentation is not misleading). But -Wall
enables this warning among others.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index