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

Initializer element is not a compile-time constant when using builtins (IEP-1341) #1065

Open
valkuc opened this issue Oct 9, 2024 · 0 comments

Comments

@valkuc
Copy link

valkuc commented Oct 9, 2024

Using fresh installation of Espressif IDE 3.1.0 and ESP IDF 5.3.1 I'm getting an error "Initializer element is not a compile-time constant" with next code:

#define __FILENAME__ (__builtin_strrchr( "/" __FILE__, '/') + 1)
static const char *TAG = __FILENAME__;

изображение

In the latest 2.x version there is no such error.
Also, the code is successfully compiling with GCC.

@github-actions github-actions bot changed the title Initializer element is not a compile-time constant when using builtins Initializer element is not a compile-time constant when using builtins (IEP-1341) Oct 9, 2024
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

1 participant