Article View: comp.std.c++
Article #2351Re: Two standards questions
From: J. Stephen Adamczyk
Date: Mon, 30 Oct 1995 13:36
Date: Mon, 30 Oct 1995 13:36
26 lines
1914 bytes
1914 bytes
In article <199510291313.NAA10621@anchovy.atml.co.uk> John Rickard <jrr@atml.co
.uk> writes:
>: >const char *messages[]={"Fun", "Stuff};
>: >const char fun[]="message";
>I'm sure it's intended that "fun" should have internal linkage. But
>from a casual perusal of the draft (April working paper), it seems to
>me that "fun" is not a const array of char, but an array of const
>char, and that "fun" itself is _not_ const (although "fun[0]" is), and
>so it has external linkage.
>
>Have I missed something, or is this a mistake in the draft?
You're right that the type of "fun" is "array of const char", but the
definition of "const-qualified" in C++ (unlike in C), when applied to an
array, tests the qualification of the underlying element type.
So the type of "fun" is const-qualified. It must be admitted that
the text relating to this in the WP [7.1.5.1 and 3.9.3] could be clearer,
but the precise question you bring up was brought before the full committee
and voted on, with the outcome as I described it.
Steve Adamczyk
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<DH9Io9.By2@edg.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backReferences:
<4kTmzbC00iVD0Bmn4x@andrew.cmu.edu> <45p7cg$oil@engnews2.Eng.Sun.COM> <199510291313.NAA10621@anchovy.atml.co.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back Date: 30 Oct 95 13:36:12 GMT Approved: fjh@cs.mu.oz.au Newsgroups: comp.std.c++ From: jsa@edg.com (J. Stephen Adamczyk) Subject: Re: Two standards questions Message-ID: <DH9Io9.By2@edg.com> Organization: Edison Design Group Inc. References: <4kTmzbC00iVD0Bmn4x@andrew.cmu.edu> <45p7cg$oil@engnews2.Eng.Sun.COM> <199510291313.NAA10621@anchovy.atml.co.uk> X-Original-Date: Mon, 30 Oct 1995 12:57:45 GMT Apparently-To: comp-std-c++@uunet.uu.net X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMJTU2uEDnX0m9pzZAQFs7AF9FNCmLUCXALlWFtLk+mgCvL8782BOCT4A Ke6fmafVCLkMFVe5USO8gVK/Lmso/E/G =5nZR