This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 11840


On Friday 07 May 2004 19:33, Tobias Schlüter wrote:
> Steven Bosscher wrote:
> > + 	gfc_error ("Unknown symbol '%s' at %L in NAMELIST '%s'",
> > + 		   sym->name, &sym->declared_at, namelist_sym->name);
> > +     }
> > + }
>
> What does this print for
> 	IMPLICIT none
> 	DIMENSION a(4)
> 	NAMELIST /x/ a
> ? It seems to me the error will point to the dimension statement, I
> haven't verified this, though.
>
> In that case, would something like
> gfc_error ("Unknown symbol '%s' in NAMELIST '%s' at %L", sym->name,
>   	   namelist_sym->name, &namelist_sym->declared_at)
> be a better choice for the error message?

No need to verify this, you are obviously right.  I'll change the
error message as you suggest.  Actually I had it like that at first,
but it seemed like a nice idea to point to the symbol in the NAMELIST.


> gfortran uses assert, insted of #ifdef ENABLE_CHECKING ... abort. In the

But using assert is against the GCC coding style, so I'm not too
happy with that at all.


> same vein, gfc_internal_error is not put between #ifdef's in other
> places. Don't know if either is something we want to change.

I certainly want to change this at some point.

Gr.
Steven



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]