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/17880] -Wsequence-point doesn't warn inside if, while, do conditions, for beg/cond/end expressions etc.



------- Comment #4 from manu at gcc dot gnu dot org  2008-08-09 12:38 -------
Subject: Bug 17880

Author: manu
Date: Sat Aug  9 12:37:32 2008
New Revision: 138904

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138904
Log:
2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

        PR c/17880
        * c-typeck.c (digest_init): Call verify_sequence_points from here.
        (c_finish_return): Likewise.
        (c_start_case): Likewise.
        * c-common.c (warn_for_collisions_1): Use explicit location in
        warning.
        * c-parser.c (c_parser_condition): New. Call
        verify_sequence_points.
        (c_parser_paren_condition): Call c_parser_condition.
        (c_parser_for_statement): Call c_parser_condition.
testsuite/
        * gcc.dg/sequence-pt-pr17880.c: New.

Added:
    trunk/gcc/testsuite/gcc.dg/sequence-pt-pr17880.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/c-parser.c
    trunk/gcc/c-typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17880


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