tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] string literal concatenation in _Static_assert


From: UnknownGamer40464 .
Subject: [Tinycc-devel] string literal concatenation in _Static_assert
Date: Mon, 13 Jan 2020 22:36:42 -0500

this snippet:

#include <stdio.h>

int main(void){
   char s[] = "foo" "bar";
   puts(s);
   _Static_assert(1==1,"foo" "bar");
}

While running fine in gcc, clang, etc. fails to compile in tcc and it seems to be because compile-time string literal concatenation is not being performed inside static asserts.

In both cases, the concatenation for s is performed as expected, it is inside _Static_assert when this problem arises.

I get the exact error message "-:6: error: ')' expected (got ""bar"")"

Using "tcc -run -", but the same error occurs in a file as well.

I am using the latest mob, "tinycc-2690425".

Sorry if I'm misunderstanding something.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]