http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58001
--- Comment #6 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Tue, Jul 30, 2013 at 12:59:00PM +0000, dominiq at lps dot ens.fr wrote: > > If compiled with -Wno-tabs, it gives > > pr58001.f90:2.1: > > print 1894 > 1 > Warning: Nonconforming tab character at (1) > pr58001.f90:3.14: > > 1894 format( '123') > 1 > Warning: Nonconforming tab character at (1) > pr58001.f90:3.14: > > 1894 format( '123') > 1 > Warning: Extension: Tab character in format at (1) > > Is this the expected behavior? With -Wno-tabs, gfortran should report a warning for the occurence of every tab used in the context of a character from the Fortran character set. Taking your code, which I've deleted here, and replace all whitespace by tabs, I get the expected number of warnings. Historically, I wanted to use -Wtabs as you expected, but there was too much wailing on the gfortran lists, so it was changed to -Wno-tabs with the meaning that "no tabs are allowed" in the context of the Fortran character set. You'll notice that tabs within a literal character string are not flagged. The history of -Wtabs verse -Wno-tabs can be found in the mailinglist archive. Now, for the problem at hand, it seems that there is a bug in io.c. Here the code in question: /* Eat up the spaces and return a character. */ static char next_char_not_space (bool *error) { char c; do { error_element = c = next_char (NONSTRING); if (c == '\t') { if (gfc_option.allow_std & GFC_STD_GNU) gfc_warning ("Extension: Tab character in format at %C"); else { gfc_error ("Extension: Tab character in format at %C"); *error = true; return c; } } } while (gfc_is_whitespace (c)); return c; } Notice that there is no check for gfc_option.warn_tabs.