gcc-10 compilation failure in c_expr_sizeof_expr
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Invalid
|
Medium
|
|||
gcc-10 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
gcc version 10.2.0 (Ubuntu 10.2.0-17ubuntu1)
$ cat qq.c
int m(int a, int b) { return sizeof(
gcc qq.c
qq.c: In function ‘m’:
qq.c:1:49: error: expected expression before ‘)’ token
1 | int m(int a, int b) { return sizeof(
| ^
qq.c:1:49: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in c_expr_sizeof_expr, at c/c-typeck.c:2946
0x764982 tree_class_
../../
0x5c561d tree_class_
../../
0x5c561d c_expr_
../../
0xa2c748 c_parser_
../../
0xa2c748 c_parser_
../../
0xa2d38d c_parser_
../../
0xa2d619 c_parser_
../../
0xa2e5f5 c_parser_
../../
0xa2ec10 c_parser_
../../
0xa2ee71 c_parser_expression
../../
0xa2f617 c_parser_
../../
0xa25af1 c_parser_
../../
0xa26fa1 c_parser_
../../
0xa45a74 c_parser_
../../
0xa47531 c_parser_
../../
0xa4f6a3 c_parser_
../../
0xa501a9 c_parser_
../../
0xa501a9 c_parse_file()
../../
0xaa81d3 c_common_
../../
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:/
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in gcc: | |
status: | Confirmed → Invalid |
Note that the workaround is just to remove the extra ( ), e.g. int m(int a, int b) { return sizeof(char[a][b]); }