gcc/testsuite/g++.dg/ext/attrib11.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-Wall" } |
| 3 | |
| 4 | // Copyright (C) 2003 Free Software Foundation, Inc. |
| 5 | // Contributed by Nathan Sidwell 30 Dec 2003 <[email protected]> |
| 6 | |
| 7 | |
| 8 | // PR c++/13507, spurious warning due to attribute clobbering |
| 9 | extern "C" { |
| 10 | extern int printf (__const char *__restrict __format, ...) throw (); |
| 11 | extern int scanf (__const char *__restrict __format, ...) throw (); |
| 12 | } |
| 13 | |
| 14 | void foo(unsigned int x) |
| 15 | { |
| 16 | printf ("%d\n", x); |
| 17 | } |