diff options
author | Ayke van Laethem <aykevanlaethem@gmail.com> | 2018-04-24 17:47:45 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-04-27 15:10:42 +1000 |
commit | deaa46aa66230071d355c0ffd004ccf0cbefd8b9 (patch) | |
tree | 378f41a1845e60c1a1c46f09ccefd7adfeb409ce /py | |
parent | 527ba0426ce5e576f6cc4102fa547417743708a1 (diff) |
py/nlrthumb: Fix Clang support wrt use of "return 0".
Clang defines __GNUC__ so we have to check for it specifically.
Diffstat (limited to 'py')
-rw-r--r-- | py/nlrthumb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/nlrthumb.c b/py/nlrthumb.c index 7dbeac1b6..c28302355 100644 --- a/py/nlrthumb.c +++ b/py/nlrthumb.c @@ -76,8 +76,9 @@ __attribute__((naked)) unsigned int nlr_push(nlr_buf_t *nlr) { #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 + // Additionally exclude Clang as it also defines __GNUC__ but doesn't need this statement return 0; #endif } |