[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] _Generic or __builtin_choose_expr
From: |
Christian Jullien |
Subject: |
Re: [Tinycc-devel] _Generic or __builtin_choose_expr |
Date: |
Fri, 14 Jul 2017 07:22:37 +0200 |
It's nice to see new features coming on tcc, but it's also nice if they work
everywhere
_Generic author(s) can you please take time to fix failing test?
Test: 94_generic...
--- ../../tests/tests2/94_generic.expect 2017-07-10
23:00:46.045513740 +0200
+++ 94_generic.output 2017-07-14 07:12:25.965274077 +0200
@@ -1,9 +1 @@
-20
-20
-123
-2
-5
-1
-2
-3
-1
+94_generic.c:44: error: type march twice
IMHO, your test depends on how different types are implemented in native
machine. So it's more a test issue than an implementation issue.
May be? Using 'portable' types like uint32_t may solve some issues. You may
also solve const/non const issue signed/unsigned char by forcing an exact
type OR by giving the same value whether string is const or not.
In any cases, 94_generic should produce NO error on platform tcc supports.
I'll be on vacation next two weeks and have limited time to investigate
myself but I'll be glad to test changes on Windows 32/64 and RPi
Christian
-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of grischka
Sent: dimanche 9 juillet 2017 12:48
To: address@hidden
Subject: Re: [Tinycc-devel] _Generic or __builtin_choose_expr
grischka wrote:
> uso ewin wrote:
>> I'm sorry but I don't have any arm machine, does someone have an idea
>> how to fix, or debug this ?
>
> ARM defines CHAR_IS_UNSIGNED which sets
> tcc_state->char_is_unsigned.
Fixed in http://repo.or.cz/tinycc.git/commitdiff/9f79b62e here:
@@ -4381,6 +4385,8 @@ ST_FUNC void unary(void)
case TOK_STR:
/* string parsing */
t = VT_BYTE;
+ if (tcc_state->char_is_unsigned)
+ t = VT_BYTE | VT_UNSIGNED;
str_init:
if (tcc_state->warn_write_strings)
t |= VT_CONSTANT;
-- gr
_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, (continued)
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/04
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, Michael Matz, 2017/07/05
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/05
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, Christian Jullien, 2017/07/06
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/06
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/06
Re: [Tinycc-devel] _Generic or __builtin_choose_expr, Christian JULLIEN, 2017/07/07
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/07
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, grischka, 2017/07/07
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, grischka, 2017/07/09
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr,
Christian Jullien <=
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/14
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, grischka, 2017/07/15
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/17
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, David Mertens, 2017/07/17
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/21
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, grischka, 2017/07/24
- Re: [Tinycc-devel] _Generic or __builtin_choose_expr, uso ewin, 2017/07/25
Re: [Tinycc-devel] _Generic or __builtin_choose_expr, Christian Jullien, 2017/07/08
Re: [Tinycc-devel] _Generic or __builtin_choose_expr, Ramsay Jones, 2017/07/08