Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Namespaces in C++
@ 1999-02-15  5:00 Rosenkranz Markus
  1999-02-15  5:00 ` Ken Block USG
  1999-03-11  5:00 ` J�rn Jensen
  0 siblings, 2 replies; 3+ messages in thread
From: Rosenkranz Markus @ 1999-02-15  5:00 UTC (permalink / raw)


According to Stroustrup, The C++ Programming Language, 3rd edition,
there ought to be a new keyword in C++, "namespace", for introducing a
certain scoping domain.  My DEC and GNU compilers seem to be still
ignorant of the new feature.  The versions are:

  `cxx -V` = "DIGITAL C++ V6.0-010 on DIGITAL UNIX V4.0 (Rev. 878)"
  `g++ -v` = "gcc version 2.8.1"

Are these versions really incapable of compiling namespaces or must I
turn on some compiler switch?  If they are indeed incapable, do you know
of any newer versions that can deal with namespaces?
-- MR



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

* Re: Namespaces in C++
  1999-02-15  5:00 Namespaces in C++ Rosenkranz Markus
@ 1999-02-15  5:00 ` Ken Block USG
  1999-03-11  5:00 ` J�rn Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Ken Block USG @ 1999-02-15  5:00 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

Both g++ and DEC C++ compilers support namespaces.  Can you give an example

of code that they do not accept?

cxxosf.zko.dec.com> rm t.o
cxxosf.zko.dec.com> g++ -version -c t.cxx
mips-tfile version egcs-2.91.57 19980901 (egcs-1.1 release)
cxxosf.zko.dec.com> ls -l t.o
-rw-rw-r--   1 block    decc        1320 Feb 15 11:43 t.o
cxxosf.zko.dec.com> rm t.o
cxxosf.zko.dec.com> cxx -V -c t.cxx
DIGITAL C++ T6.2-007 on DIGITAL UNIX V4.0 (Rev. 878)
cxxosf.zko.dec.com> ls -l t.o
-rw-rw-r--   1 block    decc         432 Feb 15 11:43 t.o


cxxosf.zko.dec.com> cat t.cxx
namespace X {
  int i;
};

namespace Y {
  int i;
};

void main()
{
  X::i = 0;
  Y::i = 0;

}

[-- Attachment #2: Card for Kenneth Block --]
[-- Type: text/x-vcard, Size: 336 bytes --]

begin:          vcard
fn:             Kenneth Block
n:              Block;Kenneth
org:            CTG C/C++ Compiler
adr:            110 Spit Brook Road;;M/S ZKO3-2/W02;Nashua;NH;03062;USA
email;internet: block@zk3.dec.com
tel;work:       603-884-2819
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


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

* Re: Namespaces in C++
  1999-02-15  5:00 Namespaces in C++ Rosenkranz Markus
  1999-02-15  5:00 ` Ken Block USG
@ 1999-03-11  5:00 ` J�rn Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: J�rn Jensen @ 1999-03-11  5:00 UTC (permalink / raw)


Rosenkranz Markus <rosenkranz@mathconsult.co.at> writes:

> Are these versions really incapable of compiling namespaces or must I
> turn on some compiler switch?  If they are indeed incapable, do you know
> of any newer versions that can deal with namespaces?

I don't remember if they are incapable, but that's not very unlikely.

I know it works with later releases of the Digital C++ though (at
least with V6.1-029). And I know it works with egcs-2.91.60.

So my best bet is that you must upgrade the compilers.

//jornj




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

end of thread, other threads:[~1999-03-11  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-02-15  5:00 Namespaces in C++ Rosenkranz Markus
1999-02-15  5:00 ` Ken Block USG
1999-03-11  5:00 ` J�rn Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox