This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++/3738


The following reply was made to PR libstdc++/3738; it has been noted by GNATS.

From: Luca Formaggia <Luca.Formaggia@epfl.ch>
To: Alexandre Oliva <aoliva@redhat.com>
Cc: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
 	gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Subject: Re: libstdc++/3738
Date: Mon, 27 Aug 2001 19:31:48 +0200

 --------------C8F330E8ED016AC23E78F12E
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Ok, you are right.
 
 By reading again B. Stroustrup more carefully I now see that it was all there!
 
 Thanks to you all and sorry to have wasted some of your time.
 
 Luca
 
 Alexandre Oliva wrote:
 
 > On Aug 24, 2001, Luca Formaggia <Luca.Formaggia@epfl.ch> wrote:
 >
 > > Well, for static integral constant member it should work, accordind to
 > > B.Stroustrup, 3rd Ed., pag 249, unless the standard has changed since then.
 >
 > The ISO C++ Standard says all static data members referenced in a
 > program must be defined (outside the class body, as opposed to only
 > declared inside it), but they must omit the initializer if the
 > declaration already initializes it.  Note, however, that no diagnostic
 > is required in case this rule is violated, which means the compiler is
 > allowed, but not required to, replace references to the static data
 > member with the constant used to initialize them.
 
 --
 --------------------------------------------------------------------------
 Luca Formaggia                           | mailto:Luca.Formaggia@epfl.ch
 Modelling and Scientific Computing       | http://dmawww.epfl.ch/~forma
 Mathematics Department                   | office: MA C2 524
 Ecole Polytechnique Federale de Lausanne | voice: +4121 6934267
 CH-1015 Lausanne, Switzerland            | fax:   +4121 6934303
 --------------------------------------------------------------------------
 
 
 
 --------------C8F330E8ED016AC23E78F12E
 Content-Type: text/html; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 <html>
 Ok, you are right.
 <p>By reading again B. Stroustrup more carefully I&nbsp;now see that it
 was all there!
 <p>Thanks to you all and sorry to have wasted some of your time.
 <p>Luca
 <p>Alexandre Oliva wrote:
 <blockquote TYPE=CITE>On Aug 24, 2001, Luca Formaggia &lt;Luca.Formaggia@epfl.ch>
 wrote:
 <p>> Well, for static integral constant member it should work, accordind
 to
 <br>> B.Stroustrup, 3rd Ed., pag 249, unless the standard has changed since
 then.
 <p>The ISO C++ Standard says all static data members referenced in a
 <br>program must be defined (outside the class body, as opposed to only
 <br>declared inside it), but they must omit the initializer if the
 <br>declaration already initializes it.&nbsp; Note, however, that no diagnostic
 <br>is required in case this rule is violated, which means the compiler
 is
 <br>allowed, but not required to, replace references to the static data
 <br>member with the constant used to initialize them.</blockquote>
 
 <pre>--&nbsp;
 --------------------------------------------------------------------------
 Luca Formaggia&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <A HREF="mailto:Luca.Formaggia@epfl.ch";>mailto:Luca.Formaggia@epfl.ch</A>
 Modelling and Scientific Computing&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <A HREF="http://dmawww.epfl.ch/~forma";>http://dmawww.epfl.ch/~forma</A>
 Mathematics Department&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | office: MA C2 524&nbsp;
 Ecole Polytechnique Federale de Lausanne | voice: +4121 6934267
 CH-1015 Lausanne, Switzerland&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | fax:&nbsp;&nbsp; +4121 6934303
 --------------------------------------------------------------------------</pre>
 &nbsp;</html>
 
 --------------C8F330E8ED016AC23E78F12E--
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]