public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* bastring.cc
@ 1998-08-23  1:27 Jeffrey A Law
  1998-08-23  1:27 ` bastring.cc Jason Merrill
  1998-08-24  4:22 ` bastring.cc Alexandre Oliva
  0 siblings, 2 replies; 7+ messages in thread
From: Jeffrey A Law @ 1998-08-23  1:27 UTC (permalink / raw)
  To: jason, drepper; +Cc: egcs

Is user code supposed to be able to include this file directly?

If yes, is bastring.cc supposed to handle multiple inclusions?

guavac in the RedHat 5.1 distribution doesn't build because the
compiler chokes because bastring.cc gets included twice.  The compiler
complains about redefinitions of stuff defined in bastring.cc.

This happens because common/unicode_string.h includes "cppstring.h"
which includes "string", which includes "bastring.h", which
includes "bastring.cc".

common/unicode_string.h then proceeds to include "bastring.cc" on
its own.


jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bastring.cc
  1998-08-23  1:27 bastring.cc Jeffrey A Law
@ 1998-08-23  1:27 ` Jason Merrill
  1998-08-24  4:22 ` bastring.cc Alexandre Oliva
  1 sibling, 0 replies; 7+ messages in thread
From: Jason Merrill @ 1998-08-23  1:27 UTC (permalink / raw)
  To: law; +Cc: drepper, egcs

>>>>> Jeffrey A Law <law@cygnus.com> writes:

 > Is user code supposed to be able to include this file directly?

No.

Jason

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bastring.cc
  1998-08-24  4:22 ` bastring.cc Alexandre Oliva
@ 1998-08-23 20:54   ` Jason Merrill
  1998-08-24  4:36     ` bastring.cc Alexandre Oliva
  1998-08-24  2:13   ` bastring.cc Jeffrey A Law
  1 sibling, 1 reply; 7+ messages in thread
From: Jason Merrill @ 1998-08-23 20:54 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: law, drepper, egcs

>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> writes:

 > Jeffrey A Law <law@cygnus.com> writes:
 >> Is user code supposed to be able to include this file directly?

 > As Jason, wrote, this is not supposed to work with the current and
 > correct approach of egcs to include bastring.cc in bastring.h.
 > Unfortunately, it was necessary to include it on some platforms such
 > as IRIX 5.2, SunOS 4.1.3 and Cygnus/GNU-Win32, that would not work
 > without bastring.cc explicitly included in every translation unit that
 > would require some symbol defined within it.

Huh?  Why?  Why didn't anyone mention this to the g++ team?

Jason

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bastring.cc
  1998-08-24  4:22 ` bastring.cc Alexandre Oliva
  1998-08-23 20:54   ` bastring.cc Jason Merrill
@ 1998-08-24  2:13   ` Jeffrey A Law
  1 sibling, 0 replies; 7+ messages in thread
From: Jeffrey A Law @ 1998-08-24  2:13 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: jason, drepper, egcs

  In message < orbtpbf478.fsf@iguacu.dcc.unicamp.br >you write:
  > A `configure' has was placed to check whether the #include was needed,
  > and it is *not* including bastring.cc twice, except in
  > UnicodeInstantiation.C, that is not included elsewhere.  I completely
  > removed the inclusions of bastring.cc, even from
  > UnicodeInstatiation.C, and I got exactly the same error, so the
  > problem must be elsewhere.
I only had to change one file in the guavac-1.1-2 source RPM on my
RedHat 5.1 CD to fix this problem.  After fixing that one file it
built just fine.

jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bastring.cc
  1998-08-24  4:36     ` bastring.cc Alexandre Oliva
@ 1998-08-24  4:22       ` Jason Merrill
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Merrill @ 1998-08-24  4:22 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: law, drepper, egcs

>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> writes:

 > Jason Merrill <jason@cygnus.com> writes:
 >>>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> writes:
 >>> Jeffrey A Law <law@cygnus.com> writes:
 >>>> Is user code supposed to be able to include this file directly?

 >>> As Jason, wrote, this is not supposed to work with the current and
 >>> correct approach of egcs to include bastring.cc in bastring.h.
 >>> Unfortunately, it was necessary to include it on some platforms such
 >>> as IRIX 5.2, SunOS 4.1.3 and Cygnus/GNU-Win32, that would not work
 >>> without bastring.cc explicitly included in every translation unit that
 >>> would require some symbol defined within it.

 >> Huh?  Why?  Why didn't anyone mention this to the g++ team?

 > I did, and that's why bastring.h now includes bastring.cc.  And I
 > suggested a temporary forward-compatible work-around for this problem
 > for both guavac and lilypond.

You shouldn't be #including bastring.h, either.  <string> is the header you
want.

Jason

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bastring.cc
  1998-08-23  1:27 bastring.cc Jeffrey A Law
  1998-08-23  1:27 ` bastring.cc Jason Merrill
@ 1998-08-24  4:22 ` Alexandre Oliva
  1998-08-23 20:54   ` bastring.cc Jason Merrill
  1998-08-24  2:13   ` bastring.cc Jeffrey A Law
  1 sibling, 2 replies; 7+ messages in thread
From: Alexandre Oliva @ 1998-08-24  4:22 UTC (permalink / raw)
  To: law; +Cc: jason, drepper, egcs

Jeffrey A Law <law@cygnus.com> writes:

> Is user code supposed to be able to include this file directly?

> If yes, is bastring.cc supposed to handle multiple inclusions?

As Jason, wrote, this is not supposed to work with the current and
correct approach of egcs to include bastring.cc in bastring.h.
Unfortunately, it was necessary to include it on some platforms such
as IRIX 5.2, SunOS 4.1.3 and Cygnus/GNU-Win32, that would not work
without bastring.cc explicitly included in every translation unit that
would require some symbol defined within it.

A `configure' has was placed to check whether the #include was needed,
and it is *not* including bastring.cc twice, except in
UnicodeInstantiation.C, that is not included elsewhere.  I completely
removed the inclusions of bastring.cc, even from
UnicodeInstatiation.C, and I got exactly the same error, so the
problem must be elsewhere.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bastring.cc
  1998-08-23 20:54   ` bastring.cc Jason Merrill
@ 1998-08-24  4:36     ` Alexandre Oliva
  1998-08-24  4:22       ` bastring.cc Jason Merrill
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Oliva @ 1998-08-24  4:36 UTC (permalink / raw)
  To: Jason Merrill; +Cc: law, drepper, egcs

Jason Merrill <jason@cygnus.com> writes:

>>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> writes:
>> Jeffrey A Law <law@cygnus.com> writes:
>>> Is user code supposed to be able to include this file directly?

>> As Jason, wrote, this is not supposed to work with the current and
>> correct approach of egcs to include bastring.cc in bastring.h.
>> Unfortunately, it was necessary to include it on some platforms such
>> as IRIX 5.2, SunOS 4.1.3 and Cygnus/GNU-Win32, that would not work
>> without bastring.cc explicitly included in every translation unit that
>> would require some symbol defined within it.

> Huh?  Why?  Why didn't anyone mention this to the g++ team?

I did, and that's why bastring.h now includes bastring.cc.  And I
suggested a temporary forward-compatible work-around for this problem
for both guavac and lilypond.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-08-24  4:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-23  1:27 bastring.cc Jeffrey A Law
1998-08-23  1:27 ` bastring.cc Jason Merrill
1998-08-24  4:22 ` bastring.cc Alexandre Oliva
1998-08-23 20:54   ` bastring.cc Jason Merrill
1998-08-24  4:36     ` bastring.cc Alexandre Oliva
1998-08-24  4:22       ` bastring.cc Jason Merrill
1998-08-24  2:13   ` bastring.cc Jeffrey A Law

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).