This is the mail archive of the libstdc++@sourceware.cygnus.com 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]

Re: enabling -O2 with gcc 2.96 and later


Phil Edwards <pedwards@jaj.com> writes:

| > can you please post the super-duper new patch pre-checkin please?
| 
| Appended.

Thanks for this.

| 
| 
| > oh man. Please, let's not go here. It took about 2 days to get -O2 working
| > with the tree-based inlining in 2.96. . . . I suppose if it works, yeah,
| > enable for 2.96. But if it doesn't, drop it and we'll clean up later.
| 
| Uhhhhhg.  I can't tell whether it works or not.  With or without (shown
| 'with' here), the current CVS sources can't be built using 2.96.  (Or 2.95,
| actually.)
| 
|     c++ -DHAVE_CONFIG_H -I. -I/home0/pedwards/libstdc++/src -I.. -nostdinc++
|     -I/home0/pedwards/libstdc++ -I/home0/pedwards/libstdc++/stl
|     -I/home0/pedwards/libstdc++/libio -D_GNU_SOURCE -fno-implicit-templates
|     -Wall -Wno-format -W -Wwrite-strings -Winline -Werror -g
|     -O2 -fstrict-aliasing -fimplicit-templates -c  -fPIC -DPIC
|     /home0/pedwards/libstdc++/src/misc-inst.cc -o .libs/misc-inst.lo
| 
|     [srcdir]/bits/fstream.tcc: In method `typename _Traits::int_type basic_filebuf<_CharT, _Traits>::_M_really_overflow (typename _Traits::int_type) [with _CharT = char, _Traits = char_traits<char>]':
|     [srcdir]/bits/fstream.tcc:133:   instantiated from `basic_filebuf<_CharT, _Traits>::close () [with _CharT = char, _Traits = char_traits<char>]'
|     [srcdir]/bits/std_fstream.h:80:   instantiated from `basic_filebuf<_CharT, _Traits>::basic_filebuf (int) [with _CharT = char, _Traits = char_traits<char>]'
|     [srcdir]/src/misc-inst.cc:79:   instantiated from here
|     [srcdir]/bits/fstream.tcc:348: creating array with size zero (`(__plen + 1)')
|     [srcdir]/bits/fstream.tcc:348: confused by earlier errors, bailing out
| 
| 
| Since I can't tell /what/ effect that switch has, I'm going to leave it out
| of this patch, and somebody more knowledgeable about it can add it later...

I'm not sure if, at this point, we should worry about
-fstrict-aliasing. For the time being, I'm inclined to leave it out.

As far as the bug is concerned, it is reproducible without
-fstrict-aliasing.  I made a bug report a couple of days ago.  See

	http://gcc.gnu.org/ml/gcc-bugs/1999-12/msg00443.html

-- Gaby

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