[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Tcc's __builtin_constant_p incompatible with gcc and clan
From: |
Petr Skočík |
Subject: |
[Tinycc-devel] Tcc's __builtin_constant_p incompatible with gcc and clang |
Date: |
Mon, 22 Oct 2018 14:34:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
I noticed this:
#include <stdio.h>
int main() { printf("%d\n", __builtin_constant_p( (puts("hello
world"),1) )); }
prints 0 on gcc and clang (I guess because comma expressions don't
satisfy the C standard's rules for Constant Expressions) but 1 on tcc.
Tcc might want to copy gcc and clang here.
Regards,
Petr Skocik
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tinycc-devel] Tcc's __builtin_constant_p incompatible with gcc and clang,
Petr Skočík <=