Re: [Tinycc-devel] miscompilation for code snippet

2022-08-16 Thread Michael Matz
n", s);  } Fixed in mob. Ciao, Michael.   -- Original -- From: "ntysdd" ; Date: Tue, Aug 16, 2022 08:32 PM To: "tinycc-devel"; Subject: miscompilation fo

Re: [Tinycc-devel] miscompilation for code snippet

2022-08-16 Thread ntysdd via Tinycc-devel
Sorry, bad format. #define G(x) _Generic((x),int*:"int*",void*:"void*") int printf(const char*, ...); int main() { int y = 0; const char *s = G(1?(void*)(y*0LL):y); printf("%s\n", s); } --Original-- From:

[Tinycc-devel] miscompilation for code snippet

2022-08-16 Thread ntysdd via Tinycc-devel
TCC gets different result than gcc or clang for code below #define G(x) _Generic((x),int*:"int*",void*:"void*") int printf(const char*, ...); int main() { int y = 0; const char *s = G(1?(void*)(y*0LL):y); printf("%s\n", s); } expected void* actual int* Similar