4.4 doesn't print the function names in the error message, while 4.5 and 4.6 do
so:
$ cat foo.c
void foo(const char *p, int cond, int a, int b)
{
p[cond ? a : b] = '\0';
}
$ gcc-4.4 -c foo.c
foo.c: In function 'foo':
foo.c:3: error: assignment of read-only location '*(p + (cond != 0 ? (long
unsigned int)(long unsigned int)a : (long unsigned int)(long unsigned int)b))'
$ gcc-4.5 -c foo.c
#'c_maybe_const_expr' not supported by pp_c_expression#) != 0 ? (long unsigned
int)a : (long unsigned int)b) * 1ul))'foo.c: In function 'foo':
foo.c:3:2: error: assignment of read-only location
is the new format expected?
--
Summary: function names in error message
(�c_maybe_const_expr� not supported by
'pp_c_expression')
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: doko at ubuntu dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45079