HI Quing,
this is a very straightforward fix for an undefined behavior in
fortran/decl.c:
> - sprintf (name, "%s_%d", name, kind_value);
> + sprintf (name + strlen (name), "_%d", kind_value);
OK for trunk. Thanks for the patch!
Regards
Thomas
Hi,
this is a very straightforward fix for an undefined behavior in fortran/decl.c:
In the man page of sprintf, it's clearly state:
===
NOTES
Some programs imprudently rely on code such as the following
sprintf(buf, "%s some further text", buf);
to append text to buf. H