From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22978 invoked by alias); 4 Aug 2007 16:53:44 -0000 Received: (qmail 21202 invoked by uid 48); 4 Aug 2007 16:53:32 -0000 Date: Sat, 04 Aug 2007 16:53:00 -0000 Message-ID: <20070804165332.21200.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/32987] TAB in FORMAT: accept extension, warn with -std=f* In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00248.txt.bz2 ------- Comment #4 from burnus at gcc dot gnu dot org 2007-08-04 16:53 ------- I just checked: ifort, sunf95, openf95, g95 and even the picky NAG f95 accept it. None of the compilers gives a warning except of "ifort" when passing the option "-stand 95": fortcom: Warning: format_with_tab.f, line 3: Extension to FORTRAN-90: tab formatting 10 format ('Hello ', 'bug!') ------------------------^ I therefore suggest: - Silently accept the tab in libgfortran - Give a warning or an error with -std=f95/f2003. Index: gcc/fortran/io.c =================================================================== --- gcc/fortran/io.c (revision 127204) +++ gcc/fortran/io.c (working copy) @@ -183,0 +184,2 @@ next_char_not_space (void) + if (c == '\t' && !(gfc_option.allow_std & GFC_STD_GNU)) + gfc_warning ("Extension: Tab character in format at %C"); Index: libgfortran/io/format.c =================================================================== --- libgfortran/io/format.c (revision 127204) +++ libgfortran/io/format.c (working copy) @@ -95 +95 @@ next_char (format_data *fmt, int literal - while (c == ' ' && !literal); + while ((c == ' ' || c == '\t') && !literal); -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu dot | |org Status|RESOLVED |UNCONFIRMED Keywords| |diagnostic Resolution|FIXED | Summary|GFortran FORMAT statement |TAB in FORMAT: accept |error |extension, warn with -std=f* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32987