[Tinycc-devel] Preprocessing issue?

2017-07-05 Thread Patrick Pelissier
Hi, I think I found an issue in the preprocessor of tcc.The following program: #define M_C2I(a, ...) a ## __VA_ARGS__ #define M_C(a, ...) M_C2I(a, __VA_ARGS__) #define M_C3I(a, b, ...)a ## b ## __VA_ARGS__ #define M_C3(a, b, ...) M_C3I(a ,b, __VA_ARGS__) #define

[Tinycc-devel] Integer promotion issue?

2018-03-31 Thread Patrick Pelissier
The following program: #include #include #include #define N_RESET(n, i) \ (((n) & (~((ONE<< ABA_CPT)-1)) & ~(ONE << (LIMBSIZE - 1 - i))) \ |((aba_cpt_t)((n) + 1))) #define LIMBSIZE (sizeof(limb_t) * CHAR_BIT) #define ABA_CPT 32

[Tinycc-devel] Array type not promoted within comma operator

2023-12-28 Thread Patrick Pelissier
Hi, The following program doesn't compile with tinycc: typedef int T[2]; int f(T t) { return _Generic(t, __typeof__( ((void)0,(T){0})) : 1 ); } whereas I was expecting it to compile (like for GCC/CLANG) due to "promotion" of "array of int" type to "int pointer" type since it uses the comma

Re: [Tinycc-devel] Preprocessing issue?

2023-12-28 Thread Patrick Pelissier
Hi, Thanks for the patch. I am not competent to know if it is correct but at least It fixes my issue. -- Regards, Patrick On Sun, Dec 24, 2023 at 8:43 AM Herman ten Brugge wrote: > > On 12/8/23 20:47, Patrick Pelissier wrote: > > Hi, > > > > I think I ha

Re: [Tinycc-devel] Array type not promoted within comma operator

2024-01-02 Thread Patrick Pelissier
On Tue, Jan 2, 2024 at 8:52 AM Herman ten Brugge wrote: > I cannot find a lot of information on this feature. > Is it a gcc/clang extension? > Does it only apply to typeof? I think it is §6.3.2.1.3 of C11. -- Regards, Patrick ___ Tinycc-devel

[Tinycc-devel] Preprocessing issue?

2023-12-08 Thread Patrick Pelissier
Hi, I think I have found an issue in TCC preprocessing. The program below produces the following output when runs with tcc -E: , USER , USER_COMP_CORE whereas I would have expected 1 more line: , USER , USER_COMP_CORE , USER_COMP_CORE (Tested with GIT