Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Vcsn Vcsn
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 85
    • Issues 85
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VcsnVcsn
  • VcsnVcsn
  • Issues
  • #216
Closed
Open
Issue created Aug 19, 2019 by Paul Hervot@DettorerDeveloper

Undefined reference to static constexpr with clang with no optimisation (Job Failed #58344)

Job #58344 failed for afaa9cd7:

The problem is an undefined reference at link time for this constexpr.

It looks like the issue described here: as indices is an odr-used static constexpr, in C++14 it must have a namespace scope declaration, but C++17 makes static constexpr inline by default, making this declaration useless.

What bothers me is that on my system, the undefined reference only happens with clang and with -O0, starting with -O1 vcsn compiles fine, gcc compiles fine also with any optimization level. I'm guessing that even in C++14 llvm inlines the constexpr as an optimization starting with -O1, and that gcc does it even with -O0, but I didn't confirm it.

I'm testing this solution, I will add it to !6 (merged) if the CI passes and I can find enough information to be confident it's indeed the problem and a correct solution.

Edited Aug 19, 2019 by Paul Hervot
Assignee
Assign to
Time tracking