NEWS revision 52284
1*** Changes in GCC 2.95:
2
3* Messages about non-conformant code that we can still handle ("pedwarns")
4  are now errors by default, rather than warnings.  This can be reverted
5  with -fpermissive, and is overridden by -pedantic or -pedantic-errors.
6
7* String constants are now of type `const char[n]', rather than `char[n]'.
8  This can be reverted with -fno-const-strings.
9
10* References to functions are now supported.
11
12* Lookup of class members during class definition now works in all cases.
13
14* In overload resolution, type conversion operators are now properly
15  treated as always coming from the most derived class.
16
17* C9x-style restricted pointers are supported, using the `__restrict'
18  keyword.
19
20* You can now use -fno-implicit-inline-templates to suppress writing out
21  implicit instantiations of inline templates.  Normally we do write them
22  out, even with -fno-implicit-templates, so that optimization doesn't
23  affect which instantiations are needed.
24
25* -fstrict-prototype now also suppresses implicit declarations.
26
27* Many obsolete options have been removed: -fall-virtual, -fmemoize-lookups,
28  -fsave-memoized, +e?, -fenum-int-equivalence, -fno-nonnull-objects.
29
30* Unused virtual functions can be discarded on some targets by specifying
31  -ffunction-sections -fvtable-gc to the compiler and --gc-sections to the
32  linker.  Unfortunately, this only works on Linux if you're linking
33  statically.
34
35* Lots of bugs stomped.
36
37*** Changes in EGCS 1.1:
38
39* Namespaces are fully supported.  The library has not yet been converted 
40  to use namespace std, however, and the old std-faking code is still on by
41  default.  To turn it off, you can use -fhonor-std.
42
43* Massive template improvements:
44  + member template classes are supported.
45  + template friends are supported.
46  + template template parameters are supported.
47  + local classes in templates are supported.
48  + lots of bugs fixed.
49
50* operator new now throws bad_alloc where appropriate.
51
52* Exception handling is now thread safe, and supports nested exceptions and
53  placement delete.  Exception handling overhead on x86 is much lower with
54  GNU as 2.9.
55
56* protected virtual inheritance is now supported.
57
58* Loops are optimized better; we now move the test to the end in most
59  cases, like the C frontend does.
60
61* For class D derived from B which has a member 'int i', &D::i is now of
62  type 'int B::*' instead of 'int D::*'.
63
64* An _experimental_ new ABI for g++ can be turned on with -fnew-abi.  The
65  current features of this are more efficient allocation of base classes
66  (including the empty base optimization), and more compact mangling of C++
67  symbol names (which can be turned on separately with -fsquangle).  This
68  ABI is subject to change without notice, so don't use it for anything
69  that you don't want to rebuild with every release of the compiler.
70
71  As with all ABI-changing flags, this flag is for experts only, as all
72  code (including the library code in libgcc and libstdc++) must be
73  compiled with the same ABI.
74
75*** Changes in EGCS 1.0:
76
77* A public review copy of the December 1996 Draft of the ISO/ANSI C++
78  standard is now available. See
79
80	http://www.cygnus.com/misc/wp/
81
82  for more information.
83
84* g++ now uses a new implementation of templates. The basic idea is that
85  now templates are minimally parsed when seen and then expanded later.
86  This allows conformant early name binding and instantiation controls,
87  since instantiations no longer have to go through the parser.
88
89  What you get:
90
91     + Inlining of template functions works without any extra effort or
92       modifications.
93     + Instantiations of class templates and methods defined in the class
94       body are deferred until they are actually needed (unless
95       -fexternal-templates is specified).
96     + Nested types in class templates work.
97     + Static data member templates work.
98     + Member function templates are now supported.
99     + Partial specialization of class templates is now supported.
100     + Explicit specification of template parameters to function templates
101       is now supported.
102
103  Things you may need to fix in your code:
104
105     + Syntax errors in templates that are never instantiated will now be
106       diagnosed.
107     + Types and class templates used in templates must be declared
108       first, or the compiler will assume they are not types, and fail.
109     + Similarly, nested types of template type parameters must be tagged
110       with the 'typename' keyword, except in base lists.  In many cases,
111       but not all, the compiler will tell you where you need to add
112       'typename'.  For more information, see
113
114            http://www.cygnus.com/misc/wp/dec96pub/template.html#temp.res
115
116     + Guiding declarations are no longer supported.  Function declarations, 
117       including friend declarations, do not refer to template instantiations.
118       You can restore the old behavior with -fguiding-decls until you fix
119       your code.
120
121  Other features:
122
123     + Default function arguments in templates will not be evaluated (or
124       checked for semantic validity) unless they are needed.  Default
125       arguments in class bodies will not be parsed until the class
126       definition is complete.
127     + The -ftemplate-depth-NN flag can be used to increase the maximum
128       recursive template instantiation depth, which defaults to 17. If you
129       need to use this flag, the compiler will tell you.
130     + Explicit instantiation of template constructors and destructors is
131       now supported.  For instance:
132
133            template A<int>::A(const A&);
134
135  Still not supported:
136
137     + Member class templates.
138     + Template friends.
139
140* Exception handling support has been significantly improved and is on by
141  default.  The compiler supports two mechanisms for walking back up the
142  call stack; one relies on static information about how registers are
143  saved, and causes no runtime overhead for code that does not throw
144  exceptions.  The other mechanism uses setjmp and longjmp equivalents, and
145  can result in quite a bit of runtime overhead.  You can determine which
146  mechanism is the default for your target by compiling a testcase that
147  uses exceptions and doing an 'nm' on the object file; if it uses __throw,
148  it's using the first mechanism.  If it uses __sjthrow, it's using the
149  second.
150
151  You can turn EH support off with -fno-exceptions.
152
153* RTTI support has been rewritten to work properly and is now on by default.
154  This means code that uses virtual functions will have a modest space
155  overhead.  You can use the -fno-rtti flag to disable RTTI support.
156
157* On ELF systems, duplicate copies of symbols with 'initialized common'
158  linkage (such as template instantiations, vtables, and extern inlines)
159  will now be discarded by the GNU linker, so you don't need to use -frepo.
160  This support requires GNU ld from binutils 2.8 or later.
161
162* The overload resolution code has been rewritten to conform to the latest
163  C++ Working Paper.  Built-in operators are now considered as candidates
164  in operator overload resolution.  Function template overloading chooses
165  the more specialized template, and handles base classes in type deduction
166  and guiding declarations properly.  In this release the old code can
167  still be selected with -fno-ansi-overloading, although this is not
168  supported and will be removed in a future release.
169
170* Standard usage syntax for the std namespace is supported; std is treated
171  as an alias for global scope.  General namespaces are still not supported.
172
173* New flags:
174
175     + New warning -Wno-pmf-conversion (don't warn about
176       converting from a bound member function pointer to function
177       pointer).
178
179     + A flag -Weffc++ has been added for violations of some of the style 
180       guidelines in Scott Meyers' _Effective C++_ books.
181
182     + -Woverloaded-virtual now warns if a virtual function in a base
183       class is hidden in a derived class, rather than warning about
184       virtual functions being overloaded (even if all of the inherited
185       signatures are overridden) as it did before.
186
187     + -Wall no longer implies -W.  The new warning flag, -Wsign-compare,
188        included in -Wall, warns about dangerous comparisons of signed and
189        unsigned values. Only the flag is new; it was previously part of
190        -W.
191
192     + The new flag, -fno-weak, disables the use of weak symbols.
193
194* Synthesized methods are now emitted in any translation units that need
195  an out-of-line copy. They are no longer affected by #pragma interface
196  or #pragma implementation.
197
198* __FUNCTION__ and __PRETTY_FUNCTION__ are now treated as variables by the
199  parser; previously they were treated as string constants.  So code like
200  `printf (__FUNCTION__ ": foo")' must be rewritten to 
201  `printf ("%s: foo", __FUNCTION__)'.  This is necessary for templates.
202
203* local static variables in extern inline functions will be shared between
204  translation units.
205
206* -fvtable-thunks is supported for all targets, and is the default for 
207  Linux with glibc 2.x (also called libc 6.x).
208
209* bool is now always the same size as another built-in type. Previously,
210  a 64-bit RISC target using a 32-bit ABI would have 32-bit pointers and a
211  64-bit bool. This should only affect Irix 6, which was not supported in
212  2.7.2.
213
214* new (nothrow) is now supported.
215
216* Synthesized destructors are no longer made virtual just because the class
217  already has virtual functions, only if they override a virtual destructor
218  in a base class.  The compiler will warn if this affects your code.
219
220* The g++ driver now only links against libstdc++, not libg++; it is
221  functionally identical to the c++ driver.
222
223* (void *)0 is no longer considered a null pointer constant; NULL in
224  <stddef.h> is now defined as __null, a magic constant of type (void *)
225  normally, or (size_t) with -ansi.
226
227* The name of a class is now implicitly declared in its own scope; A::A
228  refers to A.
229
230* Local classes are now supported.
231
232* __attribute__ can now be attached to types as well as declarations.
233
234* The compiler no longer emits a warning if an ellipsis is used as a
235  function's argument list.
236
237* Definition of nested types outside of their containing class is now
238  supported.  For instance:
239
240       struct A {
241              struct B;
242              B* bp;
243       };
244
245       struct A::B {
246              int member;
247       };
248
249* On the HPPA, some classes that do not define a copy constructor
250  will be passed and returned in memory again so that functions
251  returning those types can be inlined.
252
253*** The g++ team thanks everyone that contributed to this release,
254    but especially:
255
256* Joe Buck <jbuck@synopsys.com>, the maintainer of the g++ FAQ.
257* Brendan Kehoe <brendan@cygnus.com>, who coordinates testing of g++.
258* Jason Merrill <jason@cygnus.com>, the g++ maintainer.
259* Mark Mitchell <mmitchell@usa.net>, who implemented member function 
260  templates and explicit qualification of function templates.
261* Mike Stump <mrs@wrs.com>, the previous g++ maintainer, who did most of
262  the exception handling work.
263