As asked in PR c/36299[*], here's a testcase for this PR. It checks the absence of warning for some valid C code, to make sure the warning no longer reappears in future GCC versions.
[*] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36299#c10 -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
/* PR c/36299 */ /* { dg-do compile } */ /* { dg-options "-Waddress" } */ int foo(void) { char a[1]; return a == 0; }