This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
/* Results:
GCC:
test4.cxx:xx: error: 'void test()' was declared 'extern' and later 'static'
*/GCC (3.3):
class A { friend void test(); };
static void test() { }
int main() { test(); return 0; }
The reason why this is an error and not a warning is because it will create “wrong” code and do what you expect in 3.4 and above.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |