This is the mail archive of the 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]
Other format: [Raw text]

Re: unsafe STL patch


I kept on working on my patch and try to use __iter_base from stl_algobase.h. The problem is that there is a cyclic dependency between bits/stl_algobase.h and debug/functions.h when _GLIBCXX_DEBUG is defined. So __iter_base must be isolated in an other header. Should it be in a dedicated header or you know a header I could use ? I try for the moment to use a new dedicated header bits/stl_iterator_base.h but is there some file to update to get the link generated in the build folder:

/home/fdt/dev/gcc/host-x86_64-unknown-linux-gnu/gcc/xgcc -shared-libgcc -B/home/fdt/dev/gcc/host-x86_64-unknown-linux-gnu/gcc -nostdinc++ -L/home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -m32 -x c++-header -g -O2 -D_GNU_SOURCE -m32 -I/home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -I/home/fdt/dev/gcc/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x /home/fdt/dev/gcc/libstdc++-v3/include/precompiled/stdc++.h \
-o x86_64-unknown-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch
In file included from /home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/bits/char_traits.h:41:0,
from /home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/ios:41,
from /home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/istream:40,
from /home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/sstream:39,
from /home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/complex:47,
from /home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/ccomplex:42,
from /home/fdt/dev/gcc/libstdc++-v3/include/precompiled/stdc++.h:53:
/home/fdt/dev/gcc/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/bits/stl_algobase.h:69:36: fatal error: bits/stl_iterator_base.h: Aucun fichier ou dossier de ce type
compilation terminated.

I will work on applying the same idea on all algorithms in a future patch as it will require a small design modification. For the moment I prefer to concentrate on debug containers. For the more urgent issues, you arouse my curiosity....


Paolo Carlini wrote:
About the validity of the idea, aren't we going to lose debug mode
power. IMO no we do not lose anything as we remove the debug layer
around already validated iterators, we know that they belong to the
same container and that __first <= __last so the loop in
_M_initialize_dispatch cannot fail.
Ok, makes sense. Thus, I think the most urgent issue now would be the
Copyright assignment paperwork, because a patch covering all the
containers, range constructors and modifiers, is certainly rather
mechanical but very big. And of course I hope you would like to
contribute also outside debug-mode: frankly I can easily imagine more
urgent issues than speeding-up some of the debug-mode member functions...


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