diff options
| author | seyko <seyko2@gmail.com> | 2015-03-03 15:29:14 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2015-03-03 15:29:14 +0300 |
| commit | 09feeca5dffd3d369a8996ef68f66334d4d2c637 (patch) | |
| tree | e88dc4736cdd1f1b20e60523c78e085216e631b4 | |
| parent | 1a1e9548fba67d321da10dc9f9df858278f5d5ca (diff) | |
| download | tinycc-09feeca5dffd3d369a8996ef68f66334d4d2c637.tar.gz tinycc-09feeca5dffd3d369a8996ef68f66334d4d2c637.tar.bz2 | |
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.
| -rw-r--r-- | tccgen.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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: |
