URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// { dg-do compile }
|
// { dg-do compile }
|
// Origin: Giovanni Bajo
|
// Origin: Giovanni Bajo
|
// DR179: Function pointers and subtraction
|
// DR179: Function pointers and subtraction
|
|
|
void foo(void);
|
void foo(void);
|
typedef void (*fp)(void);
|
typedef void (*fp)(void);
|
|
|
int main()
|
int main()
|
{
|
{
|
fp f1 = foo;
|
fp f1 = foo;
|
fp f2 = foo;
|
fp f2 = foo;
|
(void)f2-f1; // { dg-error "" "cannot subtract pointers to function" }
|
(void)f2-f1; // { dg-error "" "cannot subtract pointers to function" }
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.