Skip to content

Commit

Permalink
Fixed __ATTR_PROGMEM__ by utilizing the variant available in clang (l…
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH committed Sep 19, 2022
1 parent 55e8cac commit d9a9fa7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/avr/pgmspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,18 @@
#endif

#ifndef __ATTR_PROGMEM__
#if defined __has_attribute
#if __has_attribute(__progmem__)
#define __ATTR_PROGMEM__ __attribute__((__progmem__))
#endif
#endif
#endif

#ifndef __ATTR_PROGMEM__
#ifdef __clang_version__
#define __ATTR_PROGMEM__ __flash // not really an attr
#endif
#endif

#ifndef __ATTR_PURE__
#define __ATTR_PURE__ __attribute__((__pure__))
Expand Down

0 comments on commit d9a9fa7

Please sign in to comment.