This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
gcc/gcc ChangeLog Makefile.in c-common.c c-com ...
- From: jakub at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: 1 Oct 2003 22:07:29 -0000
- Subject: gcc/gcc ChangeLog Makefile.in c-common.c c-com ...
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-rhl-branch
Changes by: jakub@gcc.gnu.org 2003-10-01 22:07:29
Modified files:
gcc : ChangeLog Makefile.in c-common.c c-common.h
calls.c expr.c input.h tree-inline.c
gcc/doc : extend.texi
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: attr-warn-unused-result.c
Log message:
* c-common.c: Include input.h.
(handle_warn_unused_result_attribute): New function.
(c_common_attribute_table): Add warn_unused_result.
(c_expand_expr): Issue warning when result of inlined function
with warn_unused_result attribute is ignored.
* calls.c (expand_call): Issue warning when result of function
with warn_unused_result attribute is ignored.
* c-common.h (STMT_EXPR_WARN_UNUSED_RESULT): Define.
* expr.c: Include input.h.
(expr_wfl_stack): Define.
(expand_expr) <case EXPR_WITH_FILE_LOCATION>: If ignore,
pass const0_rtx as target. Chain locations into expr_wfl_stack.
* tree-inline.c (expand_call_inline): Set STMT_EXPR_WARN_UNUSED_RESULT
bit if inlined function has warn_unused_result attribute.
* input.h (expr_wfl_stack): Declare.
* doc/extend.texi: Document warn_unused_result attribute.
* Makefile.in (expr.o, c-common.o): Depend on input.h.
* gcc.dg/attr-warn-unused-result.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.16114.2.523.2.74&r2=1.16114.2.523.2.75
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.958.2.9.2.3&r2=1.958.2.9.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.393.2.3.4.3&r2=1.393.2.3.4.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.164.6.1&r2=1.164.6.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.244.2.7.2.4&r2=1.244.2.7.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.498.2.17.2.8&r2=1.498.2.17.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/input.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.8&r2=1.8.30.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-inline.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.38.2.8.2.4&r2=1.38.2.8.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/extend.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.109.2.13.2.7&r2=1.109.2.13.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.2261.2.170.2.36&r2=1.2261.2.170.2.37
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/attr-warn-unused-result.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=NONE&r2=1.1.8.1