aboutsummaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-11-17 20:09:56 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-11-17 20:09:56 +0000
commitbef08b718f9cacd17fb74fab77b125d2c92b7493 (patch)
tree5ac459668109c02d425e211e6d65ca804b65d25e /gcc/regrename.c
parent5f0b7c95485eb8e6e663d7fd8df5243192a3c7df (diff)
downloadgcc-bef08b718f9cacd17fb74fab77b125d2c92b7493.zip
gcc-bef08b718f9cacd17fb74fab77b125d2c92b7493.tar.gz
gcc-bef08b718f9cacd17fb74fab77b125d2c92b7493.tar.bz2
Fix uninitialized src_range values for c_expr
gcc/c/ChangeLog: * c-parser.c (set_c_expr_source_range): Bulletproof both overloaded implementations against NULL expr->value. (c_parser_braced_init): Set src_range for "ret" to a sane pair of values. (c_parser_unary_expression): Likewise when handling addresses of labels. (c_parser_postfix_expression): Likewise for statement expressions, for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for __builtin_va_arg, and for __builtin_offset_of. (c_parser_postfix_expression_after_paren_type): Initialize expr's src_range using the range of the braced initializer. (c_parser_transaction_expression): Set src_range for "ret" to a sane pair of values. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-expressions-1.c (vector): New macro. (test_braced_init): New function. (test_statement_expression): New function. (test_address_of_label): New function. (test_transaction_expressions): New function. (test_keywords): New function. (test_builtin_va_arg): New function. (test_builtin_offsetof): New function. * lib/multiline.exp (_build_multiline_regex): Escape braces. From-SVN: r230497
Diffstat (limited to 'gcc/regrename.c')
0 files changed, 0 insertions, 0 deletions