kopia lustrzana https://github.com/micropython/micropython
py/nlrthumb: Fix Clang support wrt use of "return 0".
Clang defines __GNUC__ so we have to check for it specifically.pull/3695/merge
rodzic
527ba0426c
commit
deaa46aa66
|
@ -76,8 +76,9 @@ __attribute__((naked)) unsigned int nlr_push(nlr_buf_t *nlr) {
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8))
|
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8))
|
||||||
// Older versions of gcc give an error when naked functions don't return a value
|
// Older versions of gcc give an error when naked functions don't return a value
|
||||||
|
// Additionally exclude Clang as it also defines __GNUC__ but doesn't need this statement
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue