| Summary: | ppl C++ interface uses typeof instead of decltype | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jerry James <loganjerry> |
| Component: | ppl | Assignee: | Roberto Bagnara <bagnara> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 26 | CC: | bagnara, paulo.cesar.pereira.de.andrade |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-03-03 17:16:41 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'. PPL 1.2 has been built for Rawhide and F-26, fixing this bug. |
Description of problem: Consider this program, in pplver.cpp: #include <cstddef> #include "ppl.hh" #include <iostream> int main() { Parma_Polyhedra_Library::C_Polyhedron dummy; std::cout << PPL_VERSION_MAJOR << "." << PPL_VERSION_MINOR << "." << PPL_VERSION_REVISION; return 0; } On an F-25 or Rawhide machine, compile it with 'g++ -std=c++11 -o pplver pplver.cpp -lppl -lgmp'. The result is a series of errors, starting with this one: In file included from /usr/include/ppl.hh:25:0, from test.cpp:2: /usr/include/ppl-x86_64.hh:10677:29: error: typedef ‘Parma_Polyhedra_Library::Checked::typeof’ is initialized (use decltype instead) typedef typeof(__mpz_struct()._mp_size) mp_size_field_t; With C++11 or C++14, decltype has to be used instead of typeof. Add '-Dtypeof(x)=decltype(x)' to the compiler flags and the build succeeds. Version-Release number of selected component (if applicable): ppl-1.1-14.fc25.x86_64 How reproducible: Always Steps to Reproduce: 1. Try to build ppl-using code with -std=c++11 or -std=c++14 2. 3. Actual results: The errors reported above. Expected results: A clean build. Additional info: PPL version 1.2 has a fix for this bug.