diff options
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 435fa71c3f5..03951cfa4ea 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -2797,11 +2797,14 @@ check_bitfield_decl (tree field) } else { + location_t loc = input_location; /* Avoid the non_lvalue wrapper added by fold for PLUS_EXPRs. */ STRIP_NOPS (w); /* detect invalid field size. */ + input_location = DECL_SOURCE_LOCATION (field); w = cxx_constant_value (w); + input_location = loc; if (TREE_CODE (w) != INTEGER_CST) { |