Subject: [Boost-bugs] [Boost C++ Libraries] #11347: DS identifier causes test failures in doc/examples/dataset_example*.cpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-26 18:11:32
#11347: DS identifier causes test failures in doc/examples/dataset_example*.cpp
-------------------------------------------+---------------------
Reporter: Aparna Kumta <aparna.kumta@â¦> | Owner: rogeeff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------------+---------------------
Compiling the doc/examples/dataset_example*.cpp with Oracle Solaris Studio
on intel-S2, we see the following failure:
$"CC" -compat=5 -library=stlport4 -xO4 -mt -erroff=%none -m32 -KPIC
-DBOOST_ALL_NO_LIB=1 -DNDEBUG -I".." -c -o "/export/home/sstrunk-
tester/boost_regression/boost_intel-
S2_stlport4/results/boost/bin.v2/libs/test/test/doc_dataset_example63.test
/sun-stlport4/release/threading-multi/dataset_example63.o"
"../libs/test/test/../doc/examples/dataset_example63.cpp"
<snipped>
"../boost/test/data/monomorphic/fwd.hpp", line 74: Error: "," expected
instead of "3".
"../boost/test/data/monomorphic/fwd.hpp", line 74: Error: Expected
"class" or "typename" before "3" .
"../boost/test/data/monomorphic/fwd.hpp", line 78: Error: "," expected
instead of "3".
"../boost/test/data/monomorphic/fwd.hpp", line 78: Error: Expected
"class" or "typename" before "3" .
"../boost/test/data/monomorphic/fwd.hpp", line 79: Error: Operand expected
instead of ">".
"../boost/test/data/monomorphic/fwd.hpp", line 82: Error: "," expected
instead of "3".
"../boost/test/data/monomorphic/fwd.hpp", line 82: Error: Expected
"class" or "typename" before "3" .
"../boost/test/data/monomorphic/fwd.hpp", line 83: Error: "," expected
instead of "const".
...
Reason for failure:
The code of this test is perfectly fine from language standpoint, and the
failure is related to long-existing bug in all later Solaris versions.
Basically, compilation of any C or C++ code will fail on Solaris if it
will satisfy two conditions:
1) The presence of #include <sys/regset.h> system header, direct or
indirectly attached through other system headers from /usr/include
directory.
2) The presence of identifiers which accidentally coincide with X86
register names, like CS, DS, ES, ...
The failure occurs because that /usr/include/sys/regset.h has the
following macros:
#define CS 15
#define DS 3
#define ES 2
and when compiler preprocesses this header, after that it automatically
replaces user identifiers which accidentally have the same names with
those numbers shown above.
Possible solution:
Replace replace DS identifier in
libs/test/include/boost/test/data/monomorphic/fwd.hpp and
libs/test/include/boost/test/data/test_case.hpp
with D_S.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11347> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC