[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#590152: marked as done (gcc-4.5: ‘c_maybe_const_expr’ not supported by pp_c_expression)



Your message dated Tue, 18 Jan 2011 05:48:38 -0600
with message-id <20110118114838.GA21026@burratino>
and subject line Re: gcc-4.5: ‘c_maybe_const_expr’ not supported by pp_c_expression
has caused the Debian Bug report #590152,
regarding gcc-4.5: ‘c_maybe_const_expr’ not supported by pp_c_expression
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
590152: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590152
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-4.5
Version: 4.5.0-8
Severity: minor
Justification: confusing error message

| $ cat testcase.c
| void foo(const char *p, int cond, int a, int b)
| {
| 	p[cond ? a : b] = '\0';
| }
| $ gcc-4.5 -c testcase.c
| #‘c_maybe_const_expr’ not supported by pp_c_expression#) != 0 ? (unsigned int)a : (unsigned int)b) * 1u))’testcase.c: In function ‘foo’:
| testcase.c:3:2: error: assignment of read-only location 
| $ gcc-4.4 -c testcase.c
| testcase.c: In function ‘foo’:
| testcase.c:3: error: assignment of read-only location ‘*(p + (cond != 0 ? (unsigned int)a : (unsigned int)b))’

The message is hard to decipher and missing a trailing newline.
As far as bugs go, it is only cosmetic, but presumably it supposed
to diagnose something deeper.

Is this about range checking?



--- End Message ---
--- Begin Message ---
Version: 4.5.2-1

$ cat <<\EOF >foo.c
void foo(const char *p, int cond, int a, int b)
{
        p[cond ? a : b] = '\0';
}
EOF

$ gcc-4.5 -c foo.c
foo.c: In function ‘foo’:
foo.c:3:9: error: assignment of read-only location ‘*(p + (unsigned int)(((cond) != 0 ? (unsigned int)a : (unsigned int)b) * 1u))’

Thanks!  The upstream report and patch were instructive.


--- End Message ---

Reply to: