This is the mail archive of the gcc-cvs@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]

r122928 - in /trunk/gcc: ChangeLog c-common.c c...


Author: mueller
Date: Wed Mar 14 19:33:17 2007
New Revision: 122928

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122928
Log:
2007-03-14  Dirk Mueller  <dmueller@suse.de>

        * c-common.h (empty_body_warning): Rename to empty_if_body_warning.
        * c-common.c (empty_if_body_warning): Rephrase diagnostic message.
        * c-parser.c (c_parser_if_body): Always add an empty statement in case
        of empty body.
        * c-parser.c (c_parser_do_statement): Warn about empty body in
        do/while statement.
        * c-typeck (c_finish_if_stmt): Call empty_if_body_warning.
        * doc/invoke.texi (-Wempty-body): Update documentation.

        * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
        (finish_do_body): Warn about empty body in do/while statement.

        * g++.dg/warn/do-empty.C: New.
        * gcc.dg/do-empty.c: New.
        * gcc.dg/if-empty-1.c: Update.
        * gcc.dg/20001116-1.c: Update.
        * gcc.dg/pr23165.c: Update.


Added:
    trunk/gcc/testsuite/g++.dg/warn/do-empty.C
    trunk/gcc/testsuite/gcc.dg/do-empty.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/c-common.h
    trunk/gcc/c-parser.c
    trunk/gcc/c-typeck.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/doc/invoke.texi
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/20001116-1.c
    trunk/gcc/testsuite/gcc.dg/if-empty-1.c
    trunk/gcc/testsuite/gcc.dg/pr23165.c


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