This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

[RFA] style guidelines



Back when the iostreams were being redeclared as char[]s, somebody asked
that the "bizarre" technique we're using to insure correct initialization
code be documented.  The comments in globals.cc do a good job; this fixes
a couple of things and adds a pointer to those comments.  Okay to install?

Phil


--- egcscurrent/libstdc++-v3/docs/html/17_intro/C++STYLE	Fri Jan 19 00:42:48 2001
+++ egcsworking/libstdc++-v3/docs/html/17_intro/C++STYLE	Mon Feb  5 17:13:20 2001
@@ -7,5 +7,5 @@
 Standard, which can be referenced here:
 
-http://www.gnu.ai.mit.edu/prep/standards_toc.html 
+http://www.gnu.org/prep/standards_toc.html
 
 ChangeLog entries for member functions should use the
@@ -28,5 +28,5 @@
   
     Reason: In C++, definitions are mixed with executable code.  Here,       
-	    p          is being initialized, not *p.  This is near-universal
+	    p is being initialized, not *p.  This is near-universal
             practice among C++ programmers; it is normal for C hackers
             to switch spontaneously as they gain experience.
@@ -184,4 +184,14 @@
 
    return __ret;
+
+14. Location of global variables.
+   All global variables of class type, whether in the "user visable"
+   space (e.g., cin) or the implementation namespace, must be defined
+   as a character array and then later re-initialized to the correct
+   value.
+
+   This is due to startup issues on certain platforms, such as AIX.
+   For more explanation and examples, see src/globals.cc.  All such
+   variables should be contained in that file, for simplicity.
 
 

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