Re: gcc -ftabstop option

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: gcc -ftabstop option
Дата
Msg-id 20220622.093605.1635157735736883433.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на gcc -ftabstop option  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: gcc -ftabstop option  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At Tue, 21 Jun 2022 12:49:24 +0200, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote in 
> I suggest that we add the gcc (also clang) option -ftabstop=4.
> 
> This has two effects: First, it produces more accurate column numbers
> in compiler errors and correctly indents the code excerpts that the
> compiler shows with those.  Second, it enables the compiler's
> detection of confusingly indented code to work more correctly.  (But
> the latter is only a potential problem for code that does not use tabs
> for indentation, so it would be mostly a help during development with
> sloppy editor setups.)
> 
> Attached is a patch to discover the option in configure.
> 
> 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.
>
> Thoughts?

There's no strong reason for everyone to accept that change, but I
myself don't mind whether the option is applied or not.


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.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: PostgreSQL 15 Beta 2 release
Следующее
От: Tom Lane
Дата:
Сообщение: Re: gcc -ftabstop option