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

Fixed __ATTR_PROGMEM__ by utilizing the variant available in clang #887

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KOLANICH
Copy link

@KOLANICH KOLANICH commented Jun 9, 2022

@@ -95,8 +95,18 @@
#endif

#ifndef __ATTR_PROGMEM__
#if defined __has_attribute
#if __has_attribute(__progmem__)
Copy link
Collaborator

Choose a reason for hiding this comment

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

That won't work either when !__has_attribute, because then PROGMEM will not be defined. Why not just leave the GCC stuff untouched and do you clang stuff? Like:

#ifndef __ATTR_PROGMEM__
#ifdef __clang_version__
/* do clang stuff */
#else
#define __ATTR_PROGMEM__ __attribute__((__progmem__))
#endif
#endif

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.

3 participants