Opened 10 years ago
Closed 5 years ago
#7825 closed Bugs (fixed)
boost::spirit::qi::int_parser<mpz_class> fails to compile on g++ 4.7.2
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | To Be Determined | Component: | spirit |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: |
Description
boost::spirit::qi::int_parser<mpz_class> fails to compile with g++ 4.7.2 in C++11 mode.
It compiles successfully with g++ 4.6.3 and clang revision 170460.
( GMP version is 5.0.5. )
Here's a program which reproduces the problem:
#include <gmpxx.h> #include <boost/spirit/include/qi.hpp> struct MyGrammar : boost::spirit::qi::grammar<const char*> { public: MyGrammar() : MyGrammar::base_type(integerRule) { integerRule %= integerParser; } boost::spirit::qi::rule<const char*> integerRule; boost::spirit::qi::int_parser<mpz_class> integerParser; }; int main() {}
It compiled with:
g++-4.7 -Wall -Wextra -pedantic bin/main.cpp -o main.o
g++-4.6 -std=c++0x -Wall -Wextra -pedantic bin/main.cpp -o main.o
clang++ -std=c++11 -Wall -Wextra -pedantic bin/main.cpp -o main.o
It failed to compile with:
g++-4.7 -std=c++11 -Wall -Wextra -pedantic bin/main.cpp -o main.o
Error output: http://pastebin.com/154hhVDn
This is might be a problem in gcc, but I think this information is not sufficient for a gcc bug report.
Change History (2)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
It seems that it was a GMP bug (from the output log) and it has been fixed. Tested on Boost 1.52, GMP 6.1.0 with GCC 4.6.4 and Clang 3.3.