This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [gfortran] Fix PR14067


On Sun, 2004-05-30 at 10:24, Tobias SchlÃter wrote:
> Paul Brook wrote:
> >>2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
> >>
> >>	* trans-const.c (gfc_conv_string_init): Allow variable string
> >>	length lower than initialization string length.
> > 
> > 
> > Ok. Please also change the comment to read "padded or truncated to the correct 
> > length".
> > 
> 
> Bud privately pointed out to me that this is invalid code. If we want to 
> accept this code as an extension, I can still commit this patch, but I 
> will try to find the right place in the frontend to emit a warning or an 
> error, respectively. Right now the resolution of DATA statements is 
> somewhat mysterious to me.
 

invalid is a strong word...i just know that if i write code like this:
          character*2 animal
          data animal /'cat'/

it is probably a mistake and i would like to know about it as early as
possible.  the standard may say "silently truncate", i don't know.


tobi, i say give it ten minutes of thinking and then commit the fix. 
the ICE is the real problem, the warning is extra.  g77 just silently
truncates....


{ maybe if i want a warning i should get to work on it :) }


--bud





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