Skip to content

Commit

Permalink
Restricting GCC-specific pragmas to build.gc to avoid warnings on bui…
Browse files Browse the repository at this point in the history
…ld.mv.
  • Loading branch information
rptb1 committed Jul 25, 2023
1 parent 795f441 commit 6d4ac64
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions code/ss.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,20 @@ void StackHot(void **stackOut)
Diagnostic Pragmas
<https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html> to
suppress the warning only here. */
#pragma GCC diagnostic push
#if CONFIG_BUILD_GC
# pragma GCC diagnostic push
/* Prevent GCC 11 and GCC 12 producing warnings that they don't know
about -Wdangling-pointer and -Wunknown-warning-option. */
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Wdangling-pointer"
# pragma GCC diagnostic ignored "-Wpragmas"
# pragma GCC diagnostic ignored "-Wunknown-warning-option"
# pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif

*stackOut = &stackOut;
#pragma GCC diagnostic pop

#if CONFIG_BUILD_GC
# pragma GCC diagnostic pop
#endif
}


Expand Down

0 comments on commit 6d4ac64

Please sign in to comment.