Re: [Tinycc-devel] [PATCH] tcc: remove buggy nodata_wanted optimization

2018-02-23 Thread Michael Matz
Hi, On Thu, 22 Feb 2018, grischka wrote: However NODATA_WANTED does more than that, for example it also suppresses the "hello" with if (0) puts("hello"); Therefor I'd suggest a less radical change, such as: @@ -6916,7 +6916,7 @@ static void decl_initializer_alloc(CType *type,

Re: [Tinycc-devel] [PATCH] tcc: remove buggy nodata_wanted optimization

2018-02-23 Thread Michael Matz
Hi, On Thu, 22 Feb 2018, Mikulas Patocka wrote: > I think that that nodata_wanted misoptimization should be removed at all > - in the C language, you can jump to any location in the function with > goto or switch-case statement - thus reasoning such as "all the > variables behind if (0) are