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?