Bug 81334 - -Wmisleading-indentation prints notes about being disabled even when already intentionally ignored
Summary: -Wmisleading-indentation prints notes about being disabled even when already ...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 6.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic, easyhack
Depends on:
Blocks:
 
Reported: 2017-07-06 03:30 UTC by Mick P.
Modified: 2021-09-02 01:41 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-07-24 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mick P. 2017-07-06 03:30:59 UTC
"note: -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
    if(Min<0) Min = 0; if(Max<Min) Max = Min;"

I'm seeing output like this even while -Wmisleading-indentation is #pragma ignored and so cannot be emitted itself.

Of course clients shouldn't have to disable this on the command-line in order to quite third party headers. (And so not be able to enjoy this gloriously diversity killing--and therefor creativity eradicating--feature for themselves.)
Comment 1 Eric Gallager 2017-07-24 16:21:41 UTC
(In reply to Mick P. from comment #0)
> "note: -Wmisleading-indentation is disabled from this point onwards, since
> column-tracking was disabled due to the size of the code/headers
>     if(Min<0) Min = 0; if(Max<Min) Max = Min;"
> 
> I'm seeing output like this even while -Wmisleading-indentation is #pragma
> ignored and so cannot be emitted itself.
> 
> Of course clients shouldn't have to disable this on the command-line in
> order to quite third party headers. (And so not be able to enjoy this
> gloriously diversity killing--and therefor creativity eradicating--feature
> for themselves.)

Could you attach preprocessed source that triggers this note?
Comment 2 Manuel López-Ibáñez 2017-08-19 12:29:07 UTC
It should be a matter of checking for warn_misleading_indentation at c-family/c-indentation.c:get_visual_column()
Comment 3 Eric Gallager 2017-11-19 11:50:26 UTC
(In reply to Manuel López-Ibáñez from comment #2)
> It should be a matter of checking for warn_misleading_indentation at
> c-family/c-indentation.c:get_visual_column()

Oh, I guess if we already know where the fix needs to go, that's a confirmation of the bug
Comment 4 Dávid Bolvanský 2019-10-03 23:45:38 UTC
Two years passed and no fix :( Can somebody look at it?
Comment 5 Максим Прохоренко 2021-08-13 10:49:28 UTC
Support disabling forwarding via #paragma please.
There is a lot of noise in the log if you include huge generated files.
An example can be taken in the github project F2I-Consulting / fesapi.

GCC_DIAG_IGNORED ("-Wmisleading-indentation")
CLANG_DIAG_IGNORED ("-Wmisleading-indentation")

#ifdef NEW_FESAPI
#include "fesapi/eml2/AbstractHdfProxy.h"
#else
#include "fesapi/common/AbstractHdfProxy.h"
#endif

#include "fesapi/nsDefinitions.h"

CLANG_DIAG_RESTORE
GCC_DIAG_RESTORE