Skip to content

Commit

Permalink
Fix compiler warning with LTO on Teensy 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Dec 5, 2023
1 parent 4d2b166 commit 412cf0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions teensy3/mk20dx128.c
Expand Up @@ -1242,14 +1242,16 @@ void __cxa_pure_virtual()
while (1);
}

__extension__ typedef int __guard __attribute__((mode (__DI__)));

__attribute__((weak))
int __cxa_guard_acquire (char *g)
int __cxa_guard_acquire (__guard *g)
{
return !(*g);
}

__attribute__((weak))
void __cxa_guard_release(char *g)
void __cxa_guard_release(__guard *g)
{
*g = 1;
}
Expand Down

0 comments on commit 412cf0e

Please sign in to comment.