A couple of issues
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Feb 13 15:42:00 GMT 2007
On Tue, Feb 13, 2007 at 11:52:46AM +0000, Ignacio Fern?ndez Galv?n wrote:
> --- Ignacio Fern?ndez Galv?n <jellby@yahoo.com> wrote:
> > Consider the included test program at the end. The first thing is I
> > get a warning for:
> >
> > b=c%nom(1:2)
> > 1
> > Warning: rhs of CHARACTER assignment at (1) will be truncated (10/2)
> >
> > but I don't see anything should be truncated. It remains silent with
> > "b=a(1:2)", so it must be something with the custom type.
>
> I failed to mention that in order to see the warning I have to compile
> with -Wall.
Then don't use -Wall. :-) :-)
> > The second thing, is that, compiling with -std=f95 or -std=f2003, I
> > get
> > this error:
> >
> > Bij=RESHAPE((/ 1.0D0,3.0D0,3.0D0, &
> > 1
> > Error: Extension: Evaluation of nonstandard initialization expression
> > at (1)
> >
> > but nothing for Aij. It works fine with -std=gnu or -std=legacy.
>
> So, it seems that the standard actually does allow this, but the
> recognition of this by gfortran has to be improved, right?
>
Yep. Someday someone might fix the problem. Now, if it really
bothers you, you can grab the gfortran source and fix it. Then,
submit a patch and everyone will be happy.
--
Steve
More information about the Fortran
mailing list