Skip to content

Conversation

@mcspr
Copy link
Collaborator

@mcspr mcspr commented Jan 9, 2023

Gcc is more lenient with this, Clang is not

constexpr bool __byteAddressable(const void* addr)
inline bool __byteAddressable(const void* addr)
{
return addr < (const void*)(XCHAL_DATARAM0_VADDR + XCHAL_DATARAM0_SIZE);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

-Winvalid-constexpr

error: constexpr function never produces a constant expression [-Winvalid-constexpr]
note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression

(where ^ points at XCHAL expression)

@mcspr mcspr changed the title Function arguments are not constexpr Jan 9, 2023
@mcspr mcspr merged commit df59774 into esp8266:master Jan 9, 2023
@mcspr mcspr deleted the this-no-constexpr branch January 9, 2023 18:08
@mcspr mcspr added this to the 3.1.1 milestone Jan 9, 2023
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant