diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/shell/ash.c b/shell/ash.c index f74fbd72f..1f5a8dae0 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -6137,6 +6137,19 @@ struct backcmd { /* result of evalbackcmd */ | |||
6137 | #define EV_TESTED 02 /* exit status is checked; ignore -e flag */ | 6137 | #define EV_TESTED 02 /* exit status is checked; ignore -e flag */ |
6138 | static int evaltree(union node *, int); | 6138 | static int evaltree(union node *, int); |
6139 | 6139 | ||
6140 | /* An evaltree() which is known to never return. | ||
6141 | * Used to use an alias: | ||
6142 | * static int evaltreenr(union node *, int) __attribute__((alias("evaltree"),__noreturn__)); | ||
6143 | * but clang was reported to "transfer" noreturn-ness to evaltree() as well. | ||
6144 | */ | ||
6145 | static ALWAYS_INLINE NORETURN void | ||
6146 | evaltreenr(union node *n, int flags) | ||
6147 | { | ||
6148 | evaltree(n, flags); | ||
6149 | bb_unreachable(abort()); | ||
6150 | /* NOTREACHED */ | ||
6151 | } | ||
6152 | |||
6140 | static void FAST_FUNC | 6153 | static void FAST_FUNC |
6141 | evalbackcmd(union node *n, struct backcmd *result) | 6154 | evalbackcmd(union node *n, struct backcmd *result) |
6142 | { | 6155 | { |
@@ -6173,7 +6186,7 @@ evalbackcmd(union node *n, struct backcmd *result) | |||
6173 | */ | 6186 | */ |
6174 | eflag = 0; | 6187 | eflag = 0; |
6175 | ifsfree(); | 6188 | ifsfree(); |
6176 | evaltree(n, EV_EXIT); /* actually evaltreenr... */ | 6189 | evaltreenr(n, EV_EXIT); |
6177 | /* NOTREACHED */ | 6190 | /* NOTREACHED */ |
6178 | } | 6191 | } |
6179 | /* parent */ | 6192 | /* parent */ |
@@ -8796,11 +8809,6 @@ evaltree(union node *n, int flags) | |||
8796 | return exitstatus; | 8809 | return exitstatus; |
8797 | } | 8810 | } |
8798 | 8811 | ||
8799 | #if !defined(__alpha__) || (defined(__GNUC__) && __GNUC__ >= 3) | ||
8800 | static | ||
8801 | #endif | ||
8802 | int evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__)); | ||
8803 | |||
8804 | static int | 8812 | static int |
8805 | skiploop(void) | 8813 | skiploop(void) |
8806 | { | 8814 | { |