Hi,
When I compile for my cpu, the port for which is fairly functional (almost
all testcases pass), I get the following warnings:
gcc -c -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long
-DHAVE_CONFIG_H -I. -Icp -I../../gcc/gcc -I../../gcc/gcc/cp
-I../../gcc/gcc/../include ../../gcc/gcc/cp/decl.c -o cp/decl.o
In file included from ../../gcc/gcc/cp/decl.c:11370:
./gtype-cp.h: In function 'gt_ggc_mx_lang_decl':
./gtype-cp.h:358: warning: case label value exceeds maximum value for type
./gtype-cp.h:371: warning: case label value exceeds maximum value for type
./gtype-cp.h: In function 'gt_ggc_mx_lang_type':
./gtype-cp.h:412: warning: case label value exceeds maximum value for type
./gtype-cp.h: In function 'gt_pch_nx_lang_decl':
./gtype-cp.h:804: warning: case label value exceeds maximum value for type
./gtype-cp.h:817: warning: case label value exceeds maximum value for type
./gtype-cp.h: In function 'gt_pch_nx_lang_type':
./gtype-cp.h:859: warning: case label value exceeds maximum value for type
./gtype-cp.h: In function 'gt_pch_p_9lang_decl':
./gtype-cp.h:1414: warning: case label value exceeds maximum value for type
./gtype-cp.h:1429: warning: case label value exceeds maximum value for type
./gtype-cp.h: In function 'gt_pch_p_9lang_type':
./gtype-cp.h:1477: warning: case label value exceeds maximum value for type
The code generating the warnings looks like this, for example:
void
gt_ggc_mx_lang_decl (void *x_p)
{
struct lang_decl * const x = (struct lang_decl *)x_p;
if (ggc_test_and_set_mark (x)) {
switch (((*x).decl_flags).u1sel) {
case 0:
gt_ggc_m_9tree_node ((*x).decl_flags.u.template_info);
break;
case 1:
gt_ggc_m_16cp_binding_level ((*x).decl_flags.u.level);
break;
case 2:
gt_ggc_m_9tree_node ((*x).decl_flags.u.thunk_alias);
break;
default:
break;
}
}
...
}
In the above the "case 2" is the problem so I guess the u1sel member must be
a 1 bit bitfield. These warnings seem like a problem or can I just ignore
them?
/Roland