mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
b6ea47dca6
This is a bit of a weird one because it's a combination of the aliasing code and mixing C prototypes with QuakeC function definitions, and the function type rebuilding in qc-parse.y not being very "consistent" in its abuse of the type system.
23 lines
307 B
R
23 lines
307 B
R
typedef enum {
|
|
NO = 0,
|
|
YES
|
|
} BOOL;
|
|
|
|
@extern BOOL sel_is_mapped (SEL aSel);
|
|
BOOL (SEL aSel) sel_is_mapped = #0;
|
|
|
|
@overload int foo(int x)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
@overload int foo(float x)
|
|
{
|
|
return 2;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
//FIXME fails on implicit cast of double to float
|
|
return !(foo(5) == 1 && foo (5.0f) == 2);
|
|
}
|