This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47633] Result of COMPILER_VERSION() has NULL byte appended
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 7 Feb 2011 16:12:12 +0000
- Subject: [Bug fortran/47633] Result of COMPILER_VERSION() has NULL byte appended
- Auto-submitted: auto-generated
- References: <bug-47633-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47633
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-07 16:11:58 UTC ---
Why should there be the extra space at the end? Doesn't make sense.
IMHO either pass len - 1 to gfc_get_character_expr or don't count '\0' in len
(i.e. remove the + 1) and use len + 1 in alloca. You shouldn't use alloca btw,
but XALLOCAVEC (char, len).