2013/5/5 Jerry DeLisle <jvdeli...@charter.net>: > On 05/04/2013 06:30 PM, Steve Kargl wrote: >> On Sat, May 04, 2013 at 05:13:51PM -0700, Jerry DeLisle wrote: >>> >>> CASE_SEPARATORS: /* Not a repeat count. */ >>> case EOF: >>> + case '!': >> >> if (c == '!') >> gfc_warning("GNU Fortran extension: accepting a possibly " >> "corrupted namelist"); > > --- SNIP --- > >> I would prefer that gfortran issues an error. >> Issuing a warning is acceptable. >> Patch as is not OK IMHO. >> >> PS: A vendor extension should be documented in the manual. >> > > I don't see much point in issuing a warning if we accept it. I can just as > easily make it an error with something like "A value separator is required > before a namelist comment" and be done with trying to second guess whether > someone is using namelists right or not. > > An error would be most consistent across all variable kinds. > > Any other opinions out there?
How about throwing an error only with -std=f2008 and friends, and accepting it as an extension with -std=gnu? I find it a bit surprising that the standard requires a blank there, since it doesn't require a blank in such a situation in Fortran source code (right?). If there is no technical reason to reject it, we might as well always allow it if you ask me. But also a run-time error would certainly be an improvement over the current behavior ... Thanks for the patch, Janus