Open GWRon opened 2 years ago
Anyone having thoughts on this? Thought it would be a simple change to not emit "debuglog" in non debug builds yet it is defined as a regular function in blitz.mod/blitz.bmx and not an inbuilt function the bcc could "adjust" during compilation. So currently the parameter passed to debuglog()
is evaluated.
SuperStrict
Framework Brl.StandardIO
?Not debug
'! #define brl_blitz_DebugLog(x)
?
Type TTest
Field name:String
End Type
Local t:TTest = Null
DebugLog("name: " + t.name)
Fixed :-)
When compiling code containing this here:
You will catch it properly in debug builds - in release builds it will simply segfault
is a bit ... unclear here. it states "is ignored" which is ... kinda correct as in release builds the debuglog function just becomes an empty stub. Yet the passed parameter is evaluated before -- so not ignored.
I am aware that one could also write
but this is not the same then. I assumed using
debuglog
is similar toyet it is not similar - but you should write it that way:
So ... I wondered if it had side-effects if we simply do not "emit" converted "debuglog"-portions in release builds ?