[Top][All Lists]

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

Re: [GNU Bison 2.4.2] testsuite: Failing tests of bison 2.4.2 on Solaris

From: Dagobert Michelsen
Subject: Re: [GNU Bison 2.4.2] testsuite: Failing tests of bison 2.4.2 on Solaris 8+9 w/Sun Studio 11+12
Date: Mon, 26 Apr 2010 16:14:00 +0200

Hi Bruno,

Am 26.04.2010 um 00:51 schrieb Bruno Haible:
To summarize so far:
- The problem arises in /opt/csw/include/getopt.h, which is non- standard
 on Solaris. Not a problem gnulib is to be blamed for.

- It arises in C++ mode only. In C mode the header file works fine.

As I understand it the problem also occurs on other platforms when
there are mismatches between C/C++ include validities.

Am 16.04.2010 um 21:40 schrieb Eric Blake:
I've done some more testing.  It turns out that gnulib _correctly_
rejects /opt/csw/include/getopt.h as incompatible with the current
compiler, if you use autoconf 2.64 (prior to that, if the existence and
compilation checks disagree, autoconf went with the existence check).

The errors I'm seeing are due to the fact that Dagobert is using CC, not
cc, and I think -I/opt/csw/include is a red herring.  In fact, I can
reproduce problems on Fedora 12 when using g++, now that we replace
getopt even for glibc 1.11, to work around bugs recently fixed in newer

So I'm working on some patches to allow clean C++ compilation of getopt (even if they won't be accepted upstream in glibc); and with luck, that
will also fix Dagobert's problem with CC.

- Joel Denny writes:
it starts to feel like /opt/csw/include/getopt.h's approach
of quickly giving up on determining the best getopt argument list is
easiest. However, for C++, it can't give up because there's no such thing
as an unspecified argument list.

- Dagobert wants a small modification of his CSWlibgnugetopt package and not
 a complete reimplementation.

So here's my suggestion. Change /opt/csw/include/getopt.h like this, and be done with it. All the __STDC__ checks can be removed. No one uses K&R C
nowadays any more. Only ANSI/ISO C and C++ are relevant.

This is a nice fix for my immediate problem. Thank you for investigating
this so thouroughly!

However, I would like to ask one last time on the comments from Eric
if a general fix may not be beneficial for other platforms too.

Best regards

  -- Dago

reply via email to

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