[PATCH] Amend fallback comment to work with newer gcc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Amend fallback comment to work with newer gcc

Siddhesh Poyarekar-8
Newer gcc does not recognize the fallthrough comment due to the text
following the fallthrough keyword.  The "see above" doesn't seem too
valuable, so this patch drops it to fix the build.
---
 runtime/unwind/unwind.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/unwind/unwind.h b/runtime/unwind/unwind.h
index e5a5921ed..7fbe7cc61 100644
--- a/runtime/unwind/unwind.h
+++ b/runtime/unwind/unwind.h
@@ -160,7 +160,7 @@ static unsigned long read_ptr_sect(const u8 **pLoc, const void *end,
 #else
  BUILD_BUG_ON(sizeof(u32) != sizeof(value));
 #endif
- /* fallthrough, see above. */
+ /* fallthrough */
  case DW_EH_PE_absptr:
  if (compat_task)
  {
--
2.24.1

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Amend fallback comment to work with newer gcc

Mark Wielaard
Hi Siddhesh,

On Mon, 2020-01-27 at 12:56 +0530, Siddhesh Poyarekar wrote:
> Newer gcc does not recognize the fallthrough comment due to the text
> following the fallthrough keyword.  The "see above" doesn't seem too
> valuable, so this patch drops it to fix the build.

Thanks. Pushed.

I am slightly surprised gcc made this stricter. But this is more
consistent. This was the only place in the code base where we didn't
use the bare /* fallthrough */ comment.

Cheers,

Mark