bug-bison
[Top][All Lists]
Advanced

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

Re: Error compiling bison 3.4.2 on Solaris


From: Dagobert Michelsen
Subject: Re: Error compiling bison 3.4.2 on Solaris
Date: Tue, 15 Oct 2019 13:07:33 +0200

Hi Paul,

Am 15.10.2019 um 06:08 schrieb Paul Eggert <address@hidden>:
> On 10/14/19 1:32 AM, Dagobert Michelsen wrote:
>> I guess nowadays int is always 64 bit
> 
> No, it's 32 bits on that platform.
> 
>> I am trying to compile the most recent bison 3.4.2 on Solaris 10 Sparc and 
>> i386 with Sun Studio
>> and get the error
>>   CC       src/bison-state.o
>> "./lib/inttypes.h", line 61: #error: "This file assumes that 'int' has 
>> exactly 32 bits. Please report your platform and compiler to 
>> <address@hidden>."
>> cc: acomp failed for src/state.c
>> gmake[2]: *** [Makefile:7088: src/bison-state.o] Error 2
> 
> I'm not seeing that problem on Solaris 10 sparc with Oracle Developer Studio 
> 12.6 (a.k.a. Sun Studio). I built Bison 3.4.2 as follows:
> 
> export 
> PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/r/share1/src/developerstudio12.6/bin
> ./configure M4=/usr/sfw/bin/gm4
> 
> where the Oracle compiler was installed in /r/share1/src/developerstudio12.6. 
> How did you build Bison?
> 
> Also, what's the output of 'cc -E' on the following input, when you use your 
> compiler with the same flags that you used to build Bison?
> 
> #include <inttypes.h>
> #include <stdint.h>
> #include <limits.h>
> !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
> 
> For me, the output ends like this:
> 
> !( ( - 2147483647 - 1 ) ==  ( - 2147483647 - 1 ) &&  2147483647 ==  ( 
> 2147483647 ))
> #ident "acomp: Studio 12.6 Sun C 5.15 SunOS_sparc 2017/05/30“

It seems to be a compiler issue:
Studio 12.6: works
Studio 12.5: works
Studio 12.4: works
Studio 12.3: broken with the error above
Studio 12.2: broken with the error above
Studio 12.1: broken with the error above
Studio 12: broken with the error above
GCC 5.5.0: works

The output for Studio 12 which shows the error returns

!( ( - 2147483647 - 1 ) ==  ( - 2147483647 - 1 ) &&  2147483647 ==  ( 
2147483647 ))
#ident "acomp: Sun C 5.9 SunOS_i386 Patch 124868-15 2010/08/11“


I am a bit puzzled what has changed here, but Studio 12.3 is already quite old 
and I am not
sure if it worth further investigation, what do you think? For me it would be 
ok to just close
this issue but if you want I’ll gladly help further investigate this issue.



Best regards

  — Dago




reply via email to

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