GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Guard some GCC-specific warning pragmas in libscript · livecode/livecode@51f1402

This repository was archived by the owner on Aug 31, 2021. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • libscript/src
    • script-bytecode.hpp
    • script-module.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎libscript/src/script-bytecode.hpp‎

Copy file name to clipboardExpand all lines: libscript/src/script-bytecode.hpp
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,10 @@ inline bool MCScriptBytecodeDispatchR(MCScriptBytecodeOp p_op,
941941
const Visitor& p_visitor,
942942
Arg& p_arg)
943943
{
944+
#ifdef __GNUC__
944945
_Pragma("GCC diagnostic push")
945946
_Pragma("GCC diagnostic error \"-Wswitch\"")
947+
#endif
946948
switch(p_op)
947949
{
948950
MC_SCRIPT_DISPATCH_BYTECODE_OP(Jump)
@@ -959,8 +961,10 @@ inline bool MCScriptBytecodeDispatchR(MCScriptBytecodeOp p_op,
959961
MC_SCRIPT_DISPATCH_BYTECODE_OP(AssignArray)
960962
MC_SCRIPT_DISPATCH_BYTECODE_OP(Reset)
961963
}
964+
#ifdef __GNUC__
962965
_Pragma("GCC diagnostic pop")
963-
966+
#endif
967+
964968
return true;
965969
}
966970

Collapse file

‎libscript/src/script-module.cpp‎

Copy file name to clipboardExpand all lines: libscript/src/script-module.cpp
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@
4040
* standard (because C++'s offsetof is only present for C
4141
* compatibility and is only defined for operations on C types).
4242
* Disable GCC's offsetof warnings for these macros */
43+
#ifdef __GNUC__
4344
#pragma GCC diagnostic push
4445
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
46+
#endif
4547

4648
MC_PICKLE_BEGIN_RECORD(MCScriptDefinedType)
4749
MC_PICKLE_UINDEX(index)
@@ -192,7 +194,9 @@ MC_PICKLE_BEGIN_RECORD(MCScriptModule)
192194
MC_PICKLE_END_RECORD()
193195

194196
/* Re-enable invalid-offsetof warnings */
197+
#ifdef __GNUC__
195198
#pragma GCC diagnostic pop
199+
#endif
196200

197201
////////////////////////////////////////////////////////////////////////////////
198202

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.