tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] bug - function pointers in ?: expression


From: Russ Cox
Subject: [Tinycc-devel] bug - function pointers in ?: expression
Date: Fri, 22 Jul 2005 19:54:51 -0400

This is tcc compiled from CVS earlier this afternoon.
It appears that the type of a ?: expression with function
pointers in the arms somehow gets deduced to be 
some form of integer type instead of function pointer.

The bug does not exhibit itself with char* pointers,
nor with a direct assignment.  Only the ?: line below
draws a warning.

; tcc -v
tcc version 0.9.23
; tcc -c x.c
x.c:6: warning: assignment makes pointer from integer without a cast
; cat x.c
void
f(void)
{
        void (*p)(void);
        p = f;
        p = (0 ? f : f);
}
; 

Russ




reply via email to

[Prev in Thread] Current Thread [Next in Thread]