repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
/cp
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-46336.C
blob
c021e9803523fb17ee3c8960a9b2d8b8a451e2f0
1
// PR c++/46336
2
// { dg-options -std=c++11 }
3
4
extern "C" {
5
enum A { };
6
inline constexpr A
7
f(A a, A b) // { dg-message "previous declaration" }
8
{ return A(static_cast<int>(a) & static_cast<int>(b)); }
9
enum B { };
10
inline constexpr B
11
f(B a, B b) // { dg-error "C function" }
12
{ return B(static_cast<int>(a) & static_cast<int>(b)); }
13
}
14