On Mon, 2015-12-21 at 22:20 +0100, Jakub Jelinek wrote:
> On Mon, Dec 21, 2015 at 02:10:17PM -0700, Jeff Law wrote:
> > On 12/18/2015 01:21 PM, David Malcolm wrote:
> > 
> > >I don't think there's a way to fix -Wmisleading-indentation if we're
> > >in this state, so the first part of the following patch detects if
> > >this has happened, and effectively turns off -Wmisleading-indentation
> > >from that point onwards.  To avoid a false sense of security, the
> > >patch issues a "sorry" at the that point, currently with this wording:
> > >location-overflow-test-1.c:17:0: sorry, unimplemented: 
> > >-Wmisleading-indentation is disabled from this point onwards, since 
> > >column-tracking was disabled due to the size of the code/headers
> > Seems reasonable.  I can't see any way to get indentation warnings if we
> > don't have column info.
> 
> sorry will set sorrycount to non-zero though, so seen_error () will be true
> and the compiler will exit with non-zero exit status.  That is IMHO not
> appripriate for warning (at least unless -Werror=misleading-indentation).

Some possibilities here:

(A, the patch): issue a "sorry" to indicate that the warning isn't
available anymore, leading to a nonzero exit status

(B) silently disable the warning

(C) issue a "warning" about the impaired warning, using
OPT_Wmisleading_indentation, so that it becomes an error if
-Werror=misleading-indentation.

(D) something else?

Do you have a preference as to what approach I should try?  I think I
like option (C) above.

Dave

Reply via email to