[Top][All Lists]

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

Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30

From: Paul Eggert
Subject: Re: [platform-testers] new snapshot available: grep-3.4-almost.19-ff30
Date: Mon, 21 Sep 2020 01:19:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 9/19/20 10:09 AM, Nelson H. F. Beebe wrote:
   sa_alignment_long =  ( ( size_t ) ( & ( ( ( struct { char __slot1 ; long 
__slot2 ; } * ) ( ( void * ) 0 ) ) -> __slot2 ) ) ),

This differs from the cc-test.i that I sent you: yours has "((void *) 0)" where mine had just "0". This difference is enough to break Oracle Studio cc on your platform.

It looks like the OpenIndiana folks changed /usr/include/stddef.h in a way that breaks Oracle Studio cc while continuing to work with gcc and with clang. E.g., they changed this:

 #define offsetof(s, m)  (size_t)(&(((s *)0)->m))

to this:

 #define offsetof(s, m)  ((size_t)(&(((s *)((void *) 0))->m)))

If they care about compatibility with Oracle Studio, I suggest they change the "(void *) 0" back to plain "0", as plain "0" works just fine with standard C. (The outer parens should be fine.)

Since offsetof is a C89 feature that has been standardized for 30 years, I'm not sure it's worth hassling with Gnulib to work around the fact that OpenIndiana breaks Oracle Studio cc here. You can compile grep with gcc on that platform, and it should work fine. GCC is better anyway.

For what it's worth, I just now checked Oracle Studio 12.4 on Oracle Solaris 11.2 x86, and it worked fine too. I used the VirtualBox image at:

(login as user "hol9805", password "hol9805"). On this image, cc is /opt/studio/bin/cc, cc -V says "cc: Sun C 5.13 SunOS_i386 2014/10/20", and uname -a says "cc: Sun C 5.13 SunOS_i386 2014/10/20".

> the 12.6 compiler release, now three years
> old, was the last from Oracle (at least, the last freely downloadable
> one).

Yes, in my previous message I used the free download tarball of Oracle Studio 12.6, for Solaris 10 sparc. It was unpatched.

> The physical Sun Blade 1500 machine

That's an UltraSPARC IIIi from around 2004. My sparc tests are run on a Sun Fire 280R, with an UltraSPARC III from around 2001, which we still have in production for all the usual reasons (limited new-hardware budget in academia, plus backward-compatibility constraints).

reply via email to

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