This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/68757] [6 Regression] Use of uninitialised value of size 8 in get_combined_adhoc_loc (line-map.c:214)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68757

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Tue Dec  8 16:57:27 2015
New Revision: 231414

URL: https://gcc.gnu.org/viewcvs?rev=231414&root=gcc&view=rev
Log:
PR c/68757: fix uninitialized src_range for various builtins

gcc/c/ChangeLog:
        PR c/68757
        * c-parser.c (c_parser_get_builtin_args): Add
        "out_close_paren_loc" param, and write back to it.
        (c_parser_postfix_expression): Capture the closing
        parenthesis location for RID_CHOOSE_EXPR,
        RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
        RID_BUILTIN_SHUFFLE and use it to set the source range
        for such expressions; within RID_BUILTIN_COMPLEX set
        the underlying location.

gcc/testsuite/ChangeLog:
        PR c/68757
        * gcc.dg/plugin/diagnostic-test-expressions-1.c
        (test_builtin_choose_expr): New test function.
        (test_builtin_call_with_static_chain): Likewise.
        (test_builtin_complex): Likewise.
        (test_builtin_shuffle): Likewise.


Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-parser.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]