Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.dg
/
expr
/
unary1.C
blob: 4ea230f018fadcf129bd606874b825b20ba9ed43 [
file
] [
log
] [
blame
]
// { dg-do compile }
// Unary plus (but not unary minus) can be applied to pointer types
void
*
p
;
void
f
(
void
)
{
-
p
;
// { dg-error "wrong type argument" }
+
p
;
}
template
<int>
void
g
(
void
)
{
-
p
;
// { dg-error "wrong type argument" }
+
p
;
}