Opened 3 months ago
#285 new defect
Parameter given as typeof( ({-}) ) gets unpredictable compiler error
Reported by: | mlbrooks | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description
Is a possible blocker of a suggested approach to fixing #280.
The function declaration
void f( typeof( ({ foo(); }) ), int );
suffers from the f-actual error detailed below, while these ones
void g( typeof( ({ 42 ; }) ), int ); void h( typeof( ({ foo(); }) ) );
are fine.
Note that
- f has two parameters and the ({-}) wrapping a function call
- g has two parameters
- h the ({-}) wrapping a function call
f-actual: cfa -c test.cfa
gives "error: invalid type void in function type". FYI it occurs after -Past, before -Pvaldecl.
f-expected, g- and h- actual and expected: cfa -c test.cfa
produces a test.o.
Note: See
TracTickets for help on using
tickets.