PR c/70255
commit3fa82609676e4eec8847414daf02a68cbfcbc7f0
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 May 2016 10:22:16 +0000 (10 10:22 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 May 2016 10:22:16 +0000 (10 10:22 +0000)
tree2484ab32479d623f763dc2a8064fdd7d61b77910
parent6da0ac8390a5d0518435a68c11864b075030e24f
PR c/70255
* c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
on a declaration following the definition.

* gcc.dg/attr-opt-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236071 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/attr-opt-1.c [new file with mode: 0644]