[Patch, Fortran] -Wtabs cleanup

Tobias Burnus burnus@net-b.de
Sun Nov 23 09:27:00 GMT 2014


This patch moves -Wtabs closer to the common diagnostics - and changed 
the odd reversed logic of flags = 0 meaning off.

This brings nice common diagnostic features to fixed-form source code 
for the initial indentation [tab = 6 spaces] (which doesn't show a 
location), but not to free-form source code or in-line tabs (also in 
fixed-form) as that shows a location %C but gfc_current_location doesn't 
contain a valid localtion for the common diagnostics.

For the fixed-form initial-tab diagnostic of -Wtabs, the colored output 
is not new, but it now also shows the "[-Wtabs]" or "[-Werror=tabs]" and 
handles the latter.

Note: The Wpedantic (with alias -pedantic and --pedantic) had to be 
added as otherwise the LangEnabledBy for Wall (!) didn't work; as known, 
-(W)pedantic itself is not a new option.

Note 2: As -pedantic enables -Wtabs, -pedantic-errors now also enabled 
-Werror=tabs. The testsuite seems to be run with -pedantic-errors, 
hence, I had to change a test case. Alternatively, one could either 
explicitly ("dg-options") or in the general test setup change 
"-pedantic-errors" to "-pedantic".

Build and regtested on x86-64-gnu-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wtabs.diff
Type: text/x-patch
Size: 7213 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20141123/692fd5ca/attachment.bin>


More information about the Fortran mailing list