public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: neroden@twcny.rr.com (Nathanael Nerode)
To: phil@jaj.com
Cc: gcc@gcc.gnu.org
Subject: Re: Does C++ std::queue really conflict with C header 'struct queue'?
Date: Sat, 26 Jul 2003 12:42:00 -0000	[thread overview]
Message-ID: <20030726042529.GA906@twcny.rr.com> (raw)

Phil Edwards wrote:
>On Fri, Jul 25, 2003 at 10:17:16PM -0400, Nathanael Nerode wrote:
>> The following hunk of code from fixinc.svr4 purports to fix a 
>problem, 
>which I
>> think may not be a problem.
>> 
>> The claim is that 'struct queue' in sys/stream.h conflicts with the
>> 'queue' class in C++ headers.  This seems wrong to me because the C++
>> queue class is in namespace std, and I don't see why the sys/stream.h
>> version would be.
>
>My guess is that it dates from the days when gcc didn't have proper
>namespace support.  Tomorrow I'll try removing that fix and see whether
>anything breaks on solaris.

Thanks for picking up on this!  That's what I guessed, but I wasn't 
comfortable with it until a C++ person said it.  :-)

I doubt that Solaris comes out of config.guess as "*-*-svr4*", though, 
so I think it doesn't use the fixinc.svr4 script, the only one
which still has that fix.

There is a similar issue related to math.h defining 'struct exception', 
which also appears in regular fixincludes.  Is this essentially the 
same situation, or is there some added wrinkle introduced because of the 
forwarding headers or something?  (If so, is this better fixed in 
'fixincludes' or in the forwarding headers?)  

If this is essentially the same case, you could try removing *that* fix
(hackname 'math_exception').  (I can't check that either, since my only 
machine uses glibc, which already has essentially incorporated the 
fixincludes fix into its math.h.)

Mantra: Anything I can delete is a good thing.  :-)

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html

             reply	other threads:[~2003-07-26  4:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-26 12:42 Nathanael Nerode [this message]
2003-07-30 20:14 ` Phil Edwards
2003-07-30 23:31   ` Nathanael Nerode
  -- strict thread matches above, loose matches on Subject: below --
2003-07-26  5:16 Nathanael Nerode
2003-07-26 12:08 ` Phil Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030726042529.GA906@twcny.rr.com \
    --to=neroden@twcny.rr.com \
    --cc=gcc@gcc.gnu.org \
    --cc=phil@jaj.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).