Re: gcc -ftabstop option - Mailing list pgsql-hackers

From Tom Lane
Subject Re: gcc -ftabstop option
Date
Msg-id 3143909.1655858892@sss.pgh.pa.us
Whole thread Raw
In response to Re: gcc -ftabstop option  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
> At Tue, 21 Jun 2022 12:49:24 +0200, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote in
>> One bit of trickery not addressed yet is that we might want to strip
>> out the option and not expose it through PGXS, since we don't know
>> what whitespacing rules external code uses.

This part seems like a bigger problem than the option is worth.
I agree that we can't assume third-party code prefers 4-space tabs.

Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> There was a related discussion.
> https://www.postgresql.org/message-id/BDE54C55-438C-48E9-B2A3-08EB3A0CBB9F%40yesql.se
>> The -ftabstop option is (to a large extent, not entirely) to warn when tabs and
>> spaces are mixed creating misleading indentation that the author didn't even
>> notice due to tabwidth settings?  ISTM we are better of getting these warnings
>> than suppressing them.

Isn't that kind of redundant given that (a) we have git whitespace
warnings about this and (b) pgindent will take care of any such
problems in the end?

I'll grant the point about compiler warnings possibly not lining up
precisely.  But that's yet to bother me personally, so maybe I'm
underestimating its value.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: gcc -ftabstop option
Next
From: Michael Paquier
Date:
Subject: Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?