Skip to content

*: fix redefinition of 128-bits numeric_limit#2102

Closed
SchrodingerZhu wants to merge 1 commit intopingcap:masterfrom
SchrodingerZhu:gcc-numeric-limits
Closed

*: fix redefinition of 128-bits numeric_limit#2102
SchrodingerZhu wants to merge 1 commit intopingcap:masterfrom
SchrodingerZhu:gcc-numeric-limits

Conversation

@SchrodingerZhu
Copy link
Contributor

@SchrodingerZhu SchrodingerZhu commented Jun 6, 2021

Signed-off-by: SchrodingerZhu i@zhuyi.fan

What problem does this PR solve?

Issue Number: #2064

Problem Summary:

Related macros is defined only with gnu c++ extension now.

What is changed and how it works?

Proposal: xxx

What's Changed:

enable gnu extension for modern compilers.

Check List

Tests

  • Unit test
  • Integration test

Release note

No release note

@SchrodingerZhu SchrodingerZhu changed the title : remove redefinition of 128-bits numeric_limit : fix redefinition of 128-bits numeric_limit Jun 6, 2021
Signed-off-by: SchrodingerZhu <i@zhuyi.fan>
@SchrodingerZhu
Copy link
Contributor Author

/run-all-tests

@SchrodingerZhu SchrodingerZhu changed the title : fix redefinition of 128-bits numeric_limit *: fix redefinition of 128-bits numeric_limit Jun 7, 2021
else ()
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_EXTENSIONS 0) # https://cmake.org/cmake/help/latest/prop_tgt/CXX_EXTENSIONS.html#prop_tgt:CXX_EXTENSIONS
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems gcc-7 already has __int128 support.

If we can assume the compiler won't older than gcc-7 then we can always enable this extension.

@SchrodingerZhu
Copy link
Contributor Author

closed in favor of #2139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants