summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/redecl1.C
blob: b53335ef583aca5196ed85a10094bc2504b827ff (plain)
1
2
3
4
5
6
7
// Test that we complain about redeclaration with different visibility

struct __attribute((visibility("hidden"))) B;
struct __attribute((visibility("default"))) B;	// { dg-error "visibility" }

__attribute ((visibility ("hidden"))) void f();	// { dg-warning "previous" }
__attribute ((visibility ("default"))) void f(); // { dg-warning "visibility" }