• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX Building for Mac OSX YYC throws unused variable warnings

Hi everyone,

When building a project for Mac OSX with YYC output I get the following warnings in Xcode and the compiler for almost every script that's used in my game:

/Users/blabla/gml_Object_blabla.gml.cpp:39:1: warning: unused variable '_yytmp_' [-Wunused-variable]
YY_STACKTRACE_FUNC_ENTRY( "gml_Object_blabla", 0 );
^
In file included from /Users/blabla/gml_Object_blabla.gml.cpp:1:
Blabla/YYGML.h:55:54: note: expanded from macro 'YY_STACKTRACE_FUNC_ENTRY'
#define YY_STACKTRACE_FUNC_ENTRY( _name, _line ) int _yytmp_; SYYStackTrace __stackFunc( _name, _line )

1 warning generated.



Luckily, this still results in a successful build and I'm able to play the game without issues.
However, I have a game with >7000 script files and because of these 7000+ warnings it takes several ages to build.

Has anyone encountered this issue before and can it be solved?

MacOS Mojave
Xcode 11.3
IDE v2.2.5.481
Runtime v2.2.5.378
 

LunaticEdit

Member
My guess is that it is due to the -Wunused-variable parameter added to the compile. I have no idea why they would use this flag when we're compiling auto generated code. I'm guessing this is an oversight as you typically would want this warning when doing your own native code and as such is typically enabled by default:

Screen Shot 2020-04-21 at 10.35.57 PM.png

Not necessarily a bug, but it's an absolutely useless check that does nothing for anyone. You can explicitly disable it and see if it makes a difference in compilation time. If so, you could most likely justify opening a bug report for it.
 
My guess is that it is due to the -Wunused-variable parameter added to the compile. I have no idea why they would use this flag when we're compiling auto generated code. I'm guessing this is an oversight as you typically would want this warning when doing your own native code and as such is typically enabled by default:

View attachment 30348

Not necessarily a bug, but it's an absolutely useless check that does nothing for anyone. You can explicitly disable it and see if it makes a difference in compilation time. If so, you could most likely justify opening a bug report for it.
Thanks! I didn't know this could be switched off. I'll give it a try.
 

knightshaft

Member
My guess is that it is due to the -Wunused-variable parameter added to the compile
warning: unused variable '_yytmp_' [-Wunused-variable] comes up even when you press the "Run" button which doesn't use Xcode to compile.

Thanks! I didn't know this could be switched off. I'll give it a try.
Did it work? I can't see how it would as that setting is in Xcode. I haven't even got Xcode running when I get my warnings
 
Top