|
| From: | Herman ten Brugge |
| Subject: | Re: [Tinycc-devel] Array type not promoted within comma operator |
| Date: | Tue, 2 Jan 2024 08:52:31 +0100 |
| User-agent: | Mozilla Thunderbird |
On 12/28/23 15:44, Patrick Pelissier wrote:
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 operator.
I made a patch. See attachment. I cannot find a lot of information on this feature. Is it a gcc/clang extension? Does it only apply to typeof? Herman
patch
Description: Text document
| [Prev in Thread] | Current Thread | [Next in Thread] |