History

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.

seyko committed 11 years ago

Commit 09feeca1 parent 1a1e9541 file · +5 −1Browse files

Unified · Split

tccgen.c+5−1
@@ -4761,7 +4761,11 @@ static void block(int *bsym, int *csym, int *case_sym, int *def_sym, · 4760 unmodified lines
47614761 triggered by gcc.c-torture/execute/20000917-1.c */
47624762 Sym *p;
47634763 switch(vtop->type.t & VT_BTYPE) {
4764− case VT_PTR:
4764+ /* case VT_PTR: */
4765+ /* this breaks a compilation of the linux kernel v2.4.26 */
4766+ /* pmd_t *new = ({ __asm__ __volatile__("ud2\n") ; ((pmd_t *)1); }); */
4767+ /* Look a commit a80acab: Display error on statement expressions with complex return type */
4768+ /* A pointer is not a complex return type */
47654769 case VT_STRUCT:
47664770 case VT_ENUM:
47674771 case VT_FUNC:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t