[assign][range][ptr_container] using-induced problem

Martin Wille posted about this a couple of days ago (http://lists.boost.org/boost-testing/2005/05/1216.php), but I'm afraid it could have passed unnoticed. Some tests from Boost.(Assign|Range|PointerContainer) have the following layout #include<...> using namespace std; using namespace boost; ... #include <boost/test/unit_test.hpp> having the using directives before boost/test/unit_test.hpp is AFAICS illegal and does indeed cause problems with GCC 3.4.x and GCC 4.x, see for instance http://tinyurl.com/8payc I cannot test it, but I guess it suffices to move all the includes before any using directive. This will probably clear up dozens of tests, including some toolsets that are currently marked as unusable. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

On Tue, May 31, 2005 at 08:36:41AM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Martin Wille posted about this a couple of days ago (http://lists.boost.org/boost-testing/2005/05/1216.php), but I'm afraid it could have passed unnoticed.
Some tests from Boost.(Assign|Range|PointerContainer) have the following layout
#include<...>
using namespace std; using namespace boost;
...
#include <boost/test/unit_test.hpp>
having the using directives before boost/test/unit_test.hpp is AFAICS illegal and does indeed cause problems with GCC 3.4.x and GCC 4.x, see for instance http://tinyurl.com/8payc
That's a libstdc+ bug which has been fixed in GCC's CVS. (The problem is revealed because of the using directives before the header, which are legal, but can be dangerous)
I cannot test it, but I guess it suffices to move all the includes before any using directive. This will probably clear up dozens of tests, including some toolsets that are currently marked as unusable.
jon

Jonathan Wakely ha escrito:
On Tue, May 31, 2005 at 08:36:41AM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Martin Wille posted about this a couple of days ago (http://lists.boost.org/boost-testing/2005/05/1216.php), but I'm afraid it could have passed unnoticed.
Some tests from Boost.(Assign|Range|PointerContainer) have the following layout
#include<...>
using namespace std; using namespace boost;
...
#include <boost/test/unit_test.hpp>
having the using directives before boost/test/unit_test.hpp is AFAICS illegal and does indeed cause problems with GCC 3.4.x and GCC 4.x, see for instance http://tinyurl.com/8payc
That's a libstdc+ bug which has been fixed in GCC's CVS. (The problem is revealed because of the using directives before the header, which are legal, but can be dangerous)
Yes, giving it a second thought it is probably legal... Anyway, could you confirm whether moving the includes up fixes the problem? Thank you, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
I cannot test it, but I guess it suffices to move all the includes before any using directive. This will probably clear up dozens of tests, including some toolsets that are currently marked as unusable.
jon
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

"Joaquín Mª López Muñoz" <joaquin@tid.es> wrote in message news:429C3D47.9076AD8E@tid.es... Jonathan Wakely ha escrito:
That's a libstdc+ bug which has been fixed in GCC's CVS. (The problem is revealed because of the using directives before the header, which are legal, but can be dangerous)
Yes, giving it a second thought it is probably legal... Anyway, could you confirm whether moving the includes up fixes the problem?
>>>>>>>>>>>>>>>
I agree.that would be nice to know -Thorsten

On Tue, May 31, 2005 at 12:32:39PM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Jonathan Wakely ha escrito:
On Tue, May 31, 2005 at 08:36:41AM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Martin Wille posted about this a couple of days ago (http://lists.boost.org/boost-testing/2005/05/1216.php), but I'm afraid it could have passed unnoticed.
Some tests from Boost.(Assign|Range|PointerContainer) have the following layout
#include<...>
using namespace std; using namespace boost;
...
#include <boost/test/unit_test.hpp>
having the using directives before boost/test/unit_test.hpp is AFAICS illegal and does indeed cause problems with GCC 3.4.x and GCC 4.x, see for instance http://tinyurl.com/8payc
That's a libstdc+ bug which has been fixed in GCC's CVS.
Actually, I've just realised the fix isn't on the 3.4 branch, only 4.x
(The problem is revealed because of the using directives before the header, which are legal, but can be dangerous)
Yes, giving it a second thought it is probably legal... Anyway, could you confirm whether moving the includes up fixes the problem?
I'm having serious hardware nightmares at work but I'll try to test it later today. If anyone else wants to investigate it requires GCC 3.4 (any version) and you need to compile with _GLIBCXX_DEBUG defined. jon -- "Strange how potent cheap music is." - No�l Coward

Jonathan Wakely ha escrito:
On Tue, May 31, 2005 at 12:32:39PM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Jonathan Wakely ha escrito:
On Tue, May 31, 2005 at 08:36:41AM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Martin Wille posted about this a couple of days ago (http://lists.boost.org/boost-testing/2005/05/1216.php), but I'm afraid it could have passed unnoticed.
Some tests from Boost.(Assign|Range|PointerContainer) have the following layout
#include<...>
using namespace std; using namespace boost;
...
#include <boost/test/unit_test.hpp>
having the using directives before boost/test/unit_test.hpp is AFAICS illegal and does indeed cause problems with GCC 3.4.x and GCC 4.x, see for instance http://tinyurl.com/8payc
That's a libstdc+ bug which has been fixed in GCC's CVS.
Actually, I've just realised the fix isn't on the 3.4 branch, only 4.x
(The problem is revealed because of the using directives before the header, which are legal, but can be dangerous)
Yes, giving it a second thought it is probably legal... Anyway, could you confirm whether moving the includes up fixes the problem?
I'm having serious hardware nightmares at work but I'll try to test it later today.
If anyone else wants to investigate it requires GCC 3.4 (any version) and you need to compile with _GLIBCXX_DEBUG defined.
Did you have a chance to try? Thank you, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

On Thu, Jun 02, 2005 at 08:18:21AM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Jonathan Wakely ha escrito:
I'm having serious hardware nightmares at work but I'll try to test it later today.
If anyone else wants to investigate it requires GCC 3.4 (any version) and you need to compile with _GLIBCXX_DEBUG defined.
Did you have a chance to try? Thank you,
No, sorry, I didn't get a chance. I have tested it now and you're right, just moving the unit_test.hpp include above the using directives avoids the bug in GCC 3.4's debug mode. Sorry that took so long to test! jon

Jonathan Wakely <cow <at> compsoc.man.ac.uk> writes:
On Thu, Jun 02, 2005 at 08:18:21AM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Jonathan Wakely ha escrito:
I'm having serious hardware nightmares at work but I'll try to test it later today.
If anyone else wants to investigate it requires GCC 3.4 (any version) and you need to compile with _GLIBCXX_DEBUG defined.
Did you have a chance to try? Thank you,
No, sorry, I didn't get a chance.
I have tested it now and you're right, just moving the unit_test.hpp include above the using directives avoids the bug in GCC 3.4's debug mode.
Sorry that took so long to test!
Thanks for the info! Thorsten, do you plan to change the offending code according to Jonathan's reports? Otherwise, any objection to me doing the changes? Thank you, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

"Joaquin M Lopez Munoz" <joaquin@tid.es> wrote in message news:loom.20050606T075917-854@post.gmane.org... Jonathan Wakely <cow <at> compsoc.man.ac.uk> writes: Thanks for the info! Thorsten, do you plan to change the offending code according to Jonathan's reports? Otherwise, any objection to me doing the changes?
>>>>>>>>
Please go ahead and do it (I'm a bit busy). You might need to enable the test results in the xml-file too. Thanks Thorsten

Thorsten Ottosen ha escrito:
"Joaquin M Lopez Munoz" <joaquin@tid.es> wrote in message news:loom.20050606T075917-854@post.gmane.org... Jonathan Wakely <cow <at> compsoc.man.ac.uk> writes:
Thanks for the info!
Thorsten, do you plan to change the offending code according to Jonathan's reports? Otherwise, any objection to me doing the changes?
>>>>>>>>>
Please go ahead and do it (I'm a bit busy). You might need to enable the test results in the xml-file too.
OK, it'll be done by tomorrow. Jonathan, do you happen to know the GCC Bugzilla ID for this issue? I'd like to include it in the CVS comments for reference. Thank you! Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
Thanks
Thorsten
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Mon, Jun 06, 2005 at 05:36:05PM +0200, Joaqu?n M? L?pez Mu?oz wrote:
Thorsten Ottosen ha escrito:
"Joaquin M Lopez Munoz" <joaquin@tid.es> wrote in message news:loom.20050606T075917-854@post.gmane.org... Jonathan Wakely <cow <at> compsoc.man.ac.uk> writes:
Thanks for the info!
Thorsten, do you plan to change the offending code according to Jonathan's reports? Otherwise, any objection to me doing the changes?
>>>>>>>>>>
Please go ahead and do it (I'm a bit busy). You might need to enable the test results in the xml-file too.
OK, it'll be done by tomorrow. Jonathan, do you happen to know the GCC Bugzilla ID for this issue? I'd like to include it in the CVS comments for reference. Thank you!
http://gcc.gnu.org/PR18604 That PR was only fixed for 4.0 and 4.1, hence the problems Boost still sees with GCC 3.4 jon
participants (4)
-
Joaquin M Lopez Munoz
-
Joaquín Mª López Muñoz
-
Jonathan Wakely
-
Thorsten Ottosen