PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / Wreturn-local-addr.c
blobd496d205e89b54bd751bf91864f247923002d1d8
1 /* { dg-do assemble } */
2 /* { dg-options "-Werror=return-local-addr" } */
3 /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
5 int* bad()
7 int x = 0;
8 return &x; /* { dg-error "address of local variable" } */