Re: [Tinycc-devel] TCC Bug

2025-05-28 Thread Steffen Nurpmeso
Vincent Lefevre wrote in <20250527155503.gf128...@qaa.vinc17.org>: |On 2025-05-26 19:39:03 +0800, Jackson Helie G wrote: |> In this case (long double xx=0xf.001p0L;) tcc will lose the |> last 3 digits. If p0 is changed to p-2000, all bits will be 0. However, \ |> gcc |> and clang

Re: [Tinycc-devel] TCC Bug

2025-05-28 Thread Herman ten Brugge via Tinycc-devel
On 5/26/25 13:39, Jackson Helie G wrote: In this case (long double xx=0xf.001p0L;) tcc will lose the last 3 digits. If p0 is changed to p-2000, all bits will be 0. However, gcc and clang do not have this error. Note that my current hardware system is a 16-byte long double type, with

Re: [Tinycc-devel] TCC Bug

2025-05-27 Thread Vincent Lefevre
On 2025-05-26 19:39:03 +0800, Jackson Helie G wrote: > In this case (long double xx=0xf.001p0L;) tcc will lose the > last 3 digits. If p0 is changed to p-2000, all bits will be 0. However, gcc > and clang do not have this error. Note that my current hardware system is a > 16-byte long d

[Tinycc-devel] TCC Bug

2025-05-26 Thread Jackson Helie G
In this case (long double xx=0xf.001p0L;) tcc will lose the last 3 digits. If p0 is changed to p-2000, all bits will be 0. However, gcc and clang do not have this error. Note that my current hardware system is a 16-byte long double type, with 8 bits per byte. ___

Re: [Tinycc-devel] tcc bug: big exe in 1 step

2016-05-02 Thread Sergey Korshunoff
> The problem solved by a file list reordering. I think there may be a > bug in tcc No bug in tcc. But sections filling order differs for *.c and *.o A problem was in user.c file calling slab allocator before its initialization. Moving this file after slab.c in list solved a problem.

Re: [Tinycc-devel] tcc bug: big exe in 1 step

2016-05-02 Thread Sergey Korshunoff
> 'm going to check a free memory in compilation of the each file The problem solved by a file list reordering. I think there may be a bug in tcc which don't check a destination of the call/jump when compiling many files in one step. Can I disable usage of the short call/jumps? Or this is the pro

Re: [Tinycc-devel] tcc bug: big exe in 1 step

2016-05-02 Thread Sergey Korshunoff
> This looks like a problem with tcc compiling a big code in one step May be some memory must be free() when going to compile a next file from the command line? tcc -o aaa.exe aaa1.c aaa2.c ... aaaN.c I'm going to check a free memory in compilation of the each file.

[Tinycc-devel] tcc bug: big exe in 1 step

2016-05-02 Thread Sergey Korshunoff
Hi! It looks like tcc have some bug when compiling a big exectutable in one step. This is a tccboot kernel. When I added some additional files to compile (PCI bus and ethernet) then compiled kernel hags if compiled w/o specific option -fnocode-if-false. This option is not needed for 2 steps (compil

Re: [Tinycc-devel] tcc bug?

2011-08-03 Thread grischka
yan wei wrote: Tcc can compile easymesh_1_4.c successfully, but "easymesh_1_4.exe example1.d" runs without stop. The main loop of the code is about line 2080 in function main, like [...] Thanks. However I think we cannot look into your source code to find the problem. We can try to fix the p

Re: [Tinycc-devel] tcc bug?

2011-07-31 Thread grischka
yan wei wrote: Hi, everyone, I use easymesh_1_4.c to test tcc 0.9.25 under win7. It compiles successfully but "easymesh_1_4.exe example.d" can not work. This test works ok by using Visual C++ 6.0. Does anyone know whether this is an bug of tcc? Can you tell us what line in the sou

[Tinycc-devel] tcc bug?

2011-07-28 Thread yan wei
Hi, everyone, I use easymesh_1_4.c to test tcc 0.9.25 under win7. It compiles successfully but "easymesh_1_4.exe example.d" can not work. This test works ok by using Visual C++ 6.0. Does anyone know whether this is an bug of tcc? The test code Easymesh_1_4.c and example1.d can be

[Tinycc-devel] TCC bug

2010-04-10 Thread Kenneth Forsbäck
When trying to compile the attached code, TCC is immediately hooked by Dr. Watson and then silently exits. It compiles just fine with GCC. #include #include #include "vect.h" typedef struct { t_vect s; t_vect v; } t_state; typedef struct { t_vect ds; t_vect dv; } t_deriv; t

[Tinycc-devel] tcc bug?

2009-06-14 Thread Ammar James
tcc failed to warn that the final assignment violated a constraint, and it just compiled anyways completely ignoring the 'const'. Attached is the code (19 lines). Can someone please tell me what's going on here? gcc caught it and refused to compile it. Thanks. #include #include struct somestru

[Tinycc-devel] tcc bug: __typeof does not work for function pointers

2009-04-09 Thread Masha Rabinovich
tcc bug: __typeof does not work for function pointers test case: #include #include main( int argc) { // ok __typeof(0) i = 0; // error ';' __typeof(&strcpy) p1 = strcpy; // error ';' __typeof(strcpy)* p2 = strcpy; // error ';' __typeof(MessageBoxA) *p3 = GetProcAddress(LoadLibra

[Tinycc-devel] TCC bug: construct unicode strings in preprocessor

2008-11-22 Thread Masha Rabinovich
// Expected result: // compilation without error // // Received result: // 1.c:11: warning: pasting "L" and ""SeCreateTokenPrivilege"" does not give a valid preprocessing token // 1.c:11: 'L' undeclared // #define UNICODE #include void* p = SE_CREATE_TOKEN_NAME; /* the same without windows.h:

Re: [Tinycc-devel] TCC bug: error compile rint() from math.h

2008-11-22 Thread Masha Rabinovich
math.h is from TCC package: extern __inline__ double rint (double x) { double retval; __asm__ ("frndint;": "=t" (retval) : "0" (x)); return retval; } On Sat, Nov 22, 2008 at 3:27 PM, Marc Andre Tanner <[EMAIL PROTECTED]>wrote: > On Sat, Nov 22, 2008 at 01:13:57PM +0100, Masha Rabinovich w

Re: [Tinycc-devel] TCC bug: error compile rint() from math.h

2008-11-22 Thread Marc Andre Tanner
On Sat, Nov 22, 2008 at 01:13:57PM +0100, Masha Rabinovich wrote: > // Expected result: > // compilation without error > // > // Received result: > // compilation error with invalid line number: > // > // 1.c:361: unknown constraint 't' > // > > #include > main() > { > printf("%f\n", rint(3.14))

[Tinycc-devel] TCC bug: tcc crashes while compiling

2008-11-22 Thread Masha Rabinovich
/* TCC crashes compiling this file Affected versions: 0.9.24 from http://bellard.org/tcc/ version from "Thu, 20 Nov 2008 21:52:35" from http://repo.or.cz/w/tinycc/daniel.git Tested on Windows 2000 */ #define NULL 0 typedef struct S S; struct S { char c[2]; char *str; }; enum { UNO = 1 };

[Tinycc-devel] TCC bug: error compile rint() from math.h

2008-11-22 Thread Masha Rabinovich
// Expected result: // compilation without error // // Received result: // compilation error with invalid line number: // // 1.c:361: unknown constraint 't' // #include main() { printf("%f\n", rint(3.14)); } ___ Tinycc-devel mailing list Tinycc-devel@n

[Tinycc-devel] TCC bug: struct initialisation using enums

2008-11-22 Thread Masha Rabinovich
typedef struct S S; struct S { int e; char *s; int i; }; enum { UNO = 1, DOS, TRES, }; // ok S s1[] = { {UNO, "UNO", 1}, {DOS, "DOS", 2}, {TRES, "TRES", 3}, }; // ok S s2[] = { 1, "UNO", 1, 2, "DOS", 2, 3, "TRES", 3, }; // fail S s3[] = { UNO, "UNO", 1, DOS, "DOS", 2, TRES, "TRES

Re: [Tinycc-devel] TCC bug: L"" is missing in preprocessor output

2008-11-20 Thread Daniel Glöckner
On Wed, Nov 19, 2008 at 09:24:31AM +0100, Masha Rabinovich wrote: > TCC bug: > string unicode qualifier (L"") is missing in preprocessor output Again, see http://repo.or.cz/w/tinycc/daniel.git Daniel ___ Tinycc-devel mailing list Tinycc-devel@nong

[Tinycc-devel] TCC bug: L"" is missing in preprocessor output

2008-11-19 Thread Masha Rabinovich
/* TCC bug: string unicode qualifier (L"") is missing in preprocessor output Environment: Win2000 TCC version: version 2008-09-15 from http://repo.or.cz/w/tinycc.git version 0.9.24 from http://bellard.org/tcc/ Command line: tcc.exe -E x.c Expected output: char * s1 = "Hello" ; wchar_t

Re: [Tinycc-devel] TCC bug wilt long long

2006-05-03 Thread Dave Dodge
On Tue, May 02, 2006 at 11:10:28PM +0200, Benoit DUPONT-DE-DINECHIN wrote: > Reproduce using the C file supplied: > > gcc BugTCC.c && ./a.out > OK > tcc BugTCC.c && ./a.out > KO > diff OK KO I think the following patch will fix it:

[Tinycc-devel] TCC bug wilt long long

2006-05-02 Thread Benoit DUPONT-DE-DINECHIN
Reproduce using the C file supplied: gcc BugTCC.c && ./a.out > OK tcc BugTCC.c && ./a.out > KO diff OK KO Benoit #include #include static inline int HackerU32_popc(uint32_t word) { uint32_t v = word; uint32_t w = v - ((v >> 1) & 0x); uint32_t x = (w & 0x) + ((w >>