mirror of
https://github.com/frida/tinycc
synced 2024-11-24 08:39:37 +03:00
a statement expressions with a pointer return type
A test program:
//////////////
int main()
{
void *p = ({ 0 ; ((void *)1); });
}
/////////////
Porblem is introduced in a commit a80acab
: Display error on statement expressions with complex return type
This error is exposed when compiling a linux 2.4.26. tcc 0.9.23 can sucessfully compile
this version of the linux.
This commit is contained in:
parent
1a1e9548fb
commit
09feeca5df
6
tccgen.c
6
tccgen.c
@ -4761,7 +4761,11 @@ static void block(int *bsym, int *csym, int *case_sym, int *def_sym,
|
||||
triggered by gcc.c-torture/execute/20000917-1.c */
|
||||
Sym *p;
|
||||
switch(vtop->type.t & VT_BTYPE) {
|
||||
case VT_PTR:
|
||||
/* case VT_PTR: */
|
||||
/* this breaks a compilation of the linux kernel v2.4.26 */
|
||||
/* pmd_t *new = ({ __asm__ __volatile__("ud2\n") ; ((pmd_t *)1); }); */
|
||||
/* Look a commit a80acab: Display error on statement expressions with complex return type */
|
||||
/* A pointer is not a complex return type */
|
||||
case VT_STRUCT:
|
||||
case VT_ENUM:
|
||||
case VT_FUNC:
|
||||
|
Loading…
Reference in New Issue
Block a user