On Mon, 1 Oct 2001 15:22:49 +0300
Marius Ologesa <[EMAIL PROTECTED]> wrote the immortal words:
> > imi explica si mie cineva ce inseamna chestia de mai jos?
> >
> > if ((a ? a : 0) (x,y))
> >
Facand teste pe tema asta:
#include <stdio.h>
int f(int a, int b){}
int main()
{
int x, y;
int (*a)(int, int) = f;
if ((a ? a : 0) (x,y));
}
se apeleaza f(x, y); Works ok!
int (*a)(int, int) = NULL;
Segfault -- nu are voie sa apeleze functia de la adresa 0 -- poate doar
kernelu` ar avea voie
2. sursa:
#include <stdio.h>
class A
{
public:
A(int = 0)
{}
operator int()
{}
int operator()(int, int)
{}
};
int main()
{
int x, y;
A a;
if ((a ? a : (A)0) (x,y));
}
[mologesa@mologesa]/~$ g++ test.cc
test.cc: In function `int main()':
test.cc:20: Internal compiler error in `instantiate_virtual_regs_1', at
function.c:3863
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.
--
The Marius
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.