bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: releasing v0.23?


From: Danny Milosavljevic
Subject: Re: releasing v0.23?
Date: Sun, 10 Jan 2021 21:17:25 +0100

Hi Janneke,

On Sun, 10 Jan 2021 16:51:04 +0100
Jan Nieuwenhuizen <janneke@gnu.org> wrote:

> Apparently, when compiling glibc-2.2.5, cpp0 attempts a divide-by-zero.
> Running 
> /gnu/store/8kxznsfcv3sr3l7d68w5580gigjpkqzg-gcc-core-mesboot0-2.95.3/lib/gcc-lib/arm-unknown-linux-gnu/2.95.3/cpp0
> in gdb shows __mes_uldiv, __mes_div0 on the stack.

> I have parked this for now, and found another problem; this snippet

Uhhh really?  But why?  That sounds like something it shouldn't be doing--and
probably isn't doing in the normal version.

I mean we can look at that later on--but what is going on...

> --8<---------------cut here---------------start------------->8---
> #if defined __GNUC__ && defined __GNUC_MINOR__
> # define __GNUC_PREREQ(maj, min) \
>       ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
> #else
> # define __GNUC_PREREQ(maj, min) 0
> #endif
> 
> #if __GNUC_PREREQ (3,1) && !defined __GNUG__
> #error gcc too new
> #endif
> --8<---------------cut here---------------end--------------->8---
> 
> compiles wrong with gcc-core-mesboot:
> 
> --8<---------------cut here---------------start------------->8---
> 16:34:37 janneke@novena:~/src/guix [env]
> $ 
> /gnu/store/h0v5by5fgvcqi5gkhq0yi7ma6nhyp2ql-gcc-core-mesboot0-2.95.3/bin/gcc 
> -S prereq.c 
> prereq.c:8: warning: integer constant out of range
> prereq.c:8: warning: integer constant out of range
> prereq.c:8: warning: integer constant out of range
> prereq.c:9: #error gcc too new
> [1]16:35:27 janneke@novena:~/src/guix [env]
> --8<---------------cut here---------------end--------------->8---
> 
> So we're even beyond tcc-boot now and still find problems.  What's the
> chance this is Mes/Mes C Lib related?  

I don't know.

>Do you want to help look into this/fix this before 0.23?

Sure, why not.

https://gcc.gnu.org/legacy-ml/gcc-patches/1999-07n/msg00013.html has
some "more specific" messages for the out of range thing.

Just tell me when you have time and we can collaborate on jitsi for example.

Also, maybe try some parts of it, like this:

#if (1 << 1) == 0
#warning yes
#endif

#if (0 >= (1 << 10))
#error gcc too new
#endif

I just did that on novena, with your gcc [1], and I get:

a.c:3: warning: #warning yes
a.c:6: warning: integer constant out of range
a.c:7: #error gcc too new

So the left shift operator is broken.

#if (2 >> 1) == 0
#warning yes
#endif

Right shift operator is broken too.

Multiplication works normally in that preprocessor.
Division doesn't work (4 / 2 < 0 is true; however:

#if (4 / 0) < 0
#warning yes
#endif

a.c:2: division by zero in #if
a.c:3: warning: #warning yes

).

[1] 
/gnu/store/h0v5by5fgvcqi5gkhq0yi7ma6nhyp2ql-gcc-core-mesboot0-2.95.3/bin/gcc -S 
a.c

Attachment: pgpxiRSXUuHXM.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]