Problem with gcc-Option "-pedantic" on SPARC Solaris 2.7 w. gcc 2.95.2
Hi there, I'm a new user of the boost library. I want to use the Boost Graph Library (BGL). For this I downloaded the complete boost package from www.boost.org (boost_all.tar.gz). It is Boost v. 1.28.0. I uncompressed and unpacked the stuff into a directory. Then I created a simple example program to play around with BGL. I ran into trouble when I tried to compile the code. I'm using gcc 2.95.2 on SPARC Sun Solaris 2.7. With the "-pedantic" option given I get this failure: In file included from ../../../boost_1_28_0/boost/detail/numeric_traits.hpp:69, from ../../../boost_1_28_0/boost/counting_iterator.hpp:57, from ../../../boost_1_28_0/boost/pending/integer_range.hpp:15, from ../../../boost_1_28_0/boost/graph/detail/adjacency_list.hpp:34, from ../../../boost_1_28_0/boost/graph/adjacency_list.hpp:293, from nd_patch.C:21: ../../../boost_1_28_0/boost/cstdint.hpp:202: too many `l's in integer constant ../../../boost_1_28_0/boost/cstdint.hpp:205: #error defaults not correct; you must hand modify boost/cstdint.hpp *** Error code 1 Without the -pedantic option everything works fine. As far as I understand I cannot use the option anymore for code that references BGL #includes. Is this a known problem and is there -- maybe -- a workaround? I'd like to use -pedantic because it helps me write standard conformant code. Regards, Adalbert
On Tuesday 16 July 2002 09:00 am, aegp2002 wrote:
../../../boost_1_28_0/boost/cstdint.hpp:202: too many `l's in integer constant ../../../boost_1_28_0/boost/cstdint.hpp:205: #error defaults not correct; you must hand modify boost/cstdint.hpp *** Error code 1
Without the -pedantic option everything works fine. As far as I understand I cannot use the option anymore for code that references BGL #includes. Is this a known problem and is there -- maybe -- a workaround?
I'd like to use -pedantic because it helps me write standard conformant code.
Have you tried adding -Wno-long-long? The basic problem is that -pedantic disallows the long long integral types, which are _very_ common extensions in C++ compilers that we tend to rely on. Doug
--- In Boost-Users@y..., Douglas Gregor
On Tuesday 16 July 2002 09:00 am, aegp2002 wrote:
../../../boost_1_28_0/boost/cstdint.hpp:202: too many `l's in integer constant ../../../boost_1_28_0/boost/cstdint.hpp:205: #error defaults not correct; you must hand modify boost/cstdint.hpp *** Error code 1
Without the -pedantic option everything works fine. As far as I understand I cannot use the option anymore for code that references BGL #includes. Is this a known problem and is there -- maybe -- a workaround?
I'd like to use -pedantic because it helps me write standard conformant code.
Have you tried adding -Wno-long-long? The basic problem is that -pedantic disallows the long long integral types, which are _very_ common extensions in C++ compilers that we tend to rely on.
Thanks a lot for the hint. Unfortunately it doesn't solve the problem. I studied the gcc manual and found that your statement is absolutely correct and -Wno-long-long should do the trick but I do get the same error during compile. I could place the -W-option before or behind -pedantic in the g++ command line but no success. I revisited the description of the -pedantic option and do think now that I could leave it out from now on. Regards, Adalbert.
participants (2)
-
aegp2002
-
Douglas Gregor