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: [patch, fortran] PR43217 Output of Hollerith constants which are not a multiple of 4 bytes


Dominique Dhumieres wrote:
gcc/fortran/primary.c doesn't compile for builds using -Werror:

../../work/gcc/fortran/primary.c: In function 'match_hollerith_constant':
../../work/gcc/fortran/primary.c:304:40: error: multi-character character constant [-Werror=multichar]
cc1: all warnings being treated as errors

That's the line


+ e->representation.string[num + i] = '\0 ';


Using

+	  e->representation.string[num + i] = '\0';
+	  e->representation.string[num + i + 1] = ' ';

I think you should only have the first line - "string[num+i+1]" exceeds the the bounds ...


Tobias


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