Opened 3 years ago

Closed 2 years ago

#25324 closed defect (invalid)

giac-1.4.9.45-p2 does not compile with clang-6

Reported by: rws Owned by:
Priority: critical Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords: build, clang, giac
Cc: fbissey, frederichan, parisse, slelievre Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

clang-6 has new picks:

solve.cc:5751:23: error: non-constant-expression cannot be narrowed from type 'int' to 'short' in initializer list [-Wc++11-narrowing]
      order_t order_={order,lexvars};
                      ^~~~~
solve.cc:5751:23: note: insert an explicit cast to silence this issue
      order_t order_={order,lexvars};
                      ^~~~~
                      static_cast<short>( )

I attached the full log.,

Attachments (1)

giac-1.4.9.45.p2.log (328.2 KB) - added by rws 3 years ago.

Download all attachments as: .zip

Change History (13)

Changed 3 years ago by rws

comment:1 Changed 3 years ago by fbissey

  • Cc fbissey added

comment:2 Changed 3 years ago by fbissey

Do we know what c++ standard clang-6 default to? C++11 or C++14?

comment:3 Changed 3 years ago by slelievre

  • Cc slelievre added
  • Keywords build clang giac added

According to the Clang 6.0.0 release notes,

Clang’s default C++ dialect is now gnu++14 instead of gnu++98. This means Clang will by default accept code using features from C++14 and conforming GNU extensions. Projects incompatible with C++14 can add -std=gnu++98 to their build settings to restore the previous behaviour.

Added support for some features from the C++ standard after C++17 (provisionally known as C++2a but expected to be C++20). This support can be enabled with the -std=c++2a flag.

comment:4 Changed 3 years ago by slelievre

  • Cc frederichan parisse added

Cc Giac and giacpy developers.

Last edited 3 years ago by slelievre (previous) (diff)

comment:5 Changed 3 years ago by fbissey

I suspected it could be the case. So in the interim adding std=gnu++11 is probably a good work around.

comment:6 Changed 3 years ago by slelievre

Bernard Parisse, the main Giac developer, says clang-6 recommends using static_cast to fix this problem; adding static_cast twice in solve.cc in Giac fixes it. This will be in the next stable release of Giac; see changes to solve.cc in changeset 61700 in Geogegra.

comment:7 Changed 3 years ago by vdelecroix

  • Milestone changed from sage-8.3 to sage-8.4

update milestone 8.3 -> 8.4

comment:8 Changed 3 years ago by jdemeyer

While we could upgrade giac, there is also a small issue with PARI-2.11 compatibility (#25567). So I'd rather wait until that has been fixed too.

comment:9 Changed 2 years ago by dimpase

this is tentatively fixed on #26315.

comment:10 Changed 2 years ago by dimpase

  • Milestone changed from sage-8.4 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

comment:11 Changed 2 years ago by dimpase

  • Status changed from needs_review to positive_review

fixed by #26315.

comment:12 Changed 2 years ago by embray

  • Resolution set to invalid
  • Status changed from positive_review to closed

Presuming these are all correctly reviewed as either duplicate, invalid, or wontfix.

Note: See TracTickets for help on using tickets.