Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation problem on GCC 14.1 (Linux) #429

Closed
iwasz opened this issue Jun 30, 2024 · 7 comments
Closed

Compilation problem on GCC 14.1 (Linux) #429

iwasz opened this issue Jun 30, 2024 · 7 comments

Comments

@iwasz
Copy link

iwasz commented Jun 30, 2024

Hey after upgrade to GCC 14.1 I get:

/usr/include/c++/14.1.1/type_traits:1204:52: error: non-constant condition for static assertion

If I change (remove stuff after noexcept) in build/_deps/daw_utf_range-src/include/daw/utf8/unchecked.h:

constexpr octet_iterator base( ) const
		noexcept( std::is_nothrow_copy_constructible<octet_iterator>::value ) {
	return it;
}

to:

constexpr octet_iterator base( ) const
		noexcept {
	return it;
}

then everything gets back to normal. Dunno if that's something on my side or on library's - any ideas? Thanks!

@beached
Copy link
Owner

beached commented Jun 30, 2024

I see that with gcc 14.1 in the tests. I doubt it is your code. Looking into it

@beached
Copy link
Owner

beached commented Jul 1, 2024

Interesting that with the same libstdc++, gcc 14.1 fails this and clang does not. But the type definitely is complete as it is checking std::is_nothrow_copy_constructible<char const *>::value

@iwasz
Copy link
Author

iwasz commented Jul 1, 2024 via email

@beached
Copy link
Owner

beached commented Jul 1, 2024

Same thing catching, but how can a char const * be an incomplete type right? Plus the code has compiled in constant expressions that would have checked that anyways. I get they are trying to prevent ODR here. Still looking to see if the error is wrong on the type and I have invalid code though

@beached
Copy link
Owner

beached commented Jul 1, 2024

I have a fix in the utf-range repo that will work around this. I am thinking it is a compiler issue but could not replicate a small example. changing the std::is_nothrow_copy_constructible<T>::value to std::is_nothrow_copy_constructibe_v<T> works around the issue.

beached added a commit to beached/utf_range that referenced this issue Jul 1, 2024
beached added a commit to beached/utf_range that referenced this issue Jul 1, 2024
Workaround for gcc14.1 issue in daw_json_link beached/daw_json_link#429
@beached beached mentioned this issue Jul 1, 2024
@beached
Copy link
Owner

beached commented Jul 1, 2024

This should be fixed now

@beached beached closed this as completed Jul 1, 2024
@iwasz
Copy link
Author

iwasz commented Jul 2, 2024

Thanks!

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

No branches or pull requests

2 participants