[Bug c/94230] provide an option to change the size limitation for -Wmisleading-indent

qinzhao at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 30 20:31:35 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94230

--- Comment #7 from qinzhao at gcc dot gnu.org ---
(In reply to David Malcolm from comment #6)

> If you have a huge workload, one possible workaround would be to disable
> range tracking, perhaps tweaking line_table->default_range_bits, which would
> give you a bit more "headroom".  IIRC we don't currently expose a way to do
> this, and probably some extra code would be needed.  It's currently
> hardcoded to 5.
> 
> Perhaps some kind of -fno-location-ranges?  It could either:
> (a) don't attempt to store location ranges  (would probably have to disable
> e.g. fix-it hints)
> (b) set line_table->default_range_bits to 0, so that all ranges have to go
> to the ad-hoc table, but buying space for more locations.

I have tried the above (2) to set the line_table->default_range_bits to 0. and
used
this GCC to compile our huge application with -Wmisleading-indent, this time,
the compiler works without the warning. and there are also some proper
misleading-indent warning were emitted.

So, I'd like to add one new gcc option -fno-location-range, whose
implementation is to set line_table->default_range_bits to 0 to save more space
for column tracking.

Is this good to go?


More information about the Gcc-bugs mailing list