gcc -ftabstop option - Mailing list pgsql-hackers

From Peter Eisentraut
Subject gcc -ftabstop option
Date
Msg-id 7d11adc5-2046-f29a-7f37-0f45f5093879@enterprisedb.com
Whole thread Raw
Responses Re: gcc -ftabstop option  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Re: gcc -ftabstop option  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
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?
Attachment

pgsql-hackers by date:

Previous
From: Jakub Wartak
Date:
Subject: RE: Use fadvise in wal replay
Next
From: Thomas Munro
Date:
Subject: Re: Use fadvise in wal replay