Skip to content

Commit

Permalink
Fix 'missing binary operator before token' gc error in gcconfig.h
Browse files Browse the repository at this point in the history
(a cherry-pick of commit 5507e18 from 'master')

The error occurs only if gcconfig.h is included before include gc.h
(as, e.g., done in init_global_static_roots.cpp).

* include/private/gcconfig.h [!GC_H && HAVE_CONFIG_H]: Include
config.h.
* include/private/gcconfig.h [!GC_H]: Include gc.h.
  • Loading branch information
ivmai committed Aug 28, 2023
1 parent 21cf012 commit 75e522c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/private/gcconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
#ifndef GCCONFIG_H
#define GCCONFIG_H

#ifndef GC_H
# ifdef HAVE_CONFIG_H
# include "config.h"
# endif
# include "../gc.h"
#endif

#ifdef CPPCHECK
# undef CLOCKS_PER_SEC
# undef FIXUP_POINTER
Expand Down

0 comments on commit 75e522c

Please sign in to comment.