Stanislav Gromov
Stanislav Gromov
> It appears like the compiler is checking for an allocation failure. In such a case, it throws a compiler error and then continues copying to NULL which would crash...
## `uPREDEF` is unused Much like `iREFFUNC`, the compiler checks symbols for this flag to be set in the `usage` field, but never actually sets it.
While I was analyzing all uses of `lexpush()` (in case there are more misuses of this function in combination with `matchtoken()` or `needtoken()`, as described in https://github.com/pawn-lang/compiler/issues/524#issuecomment-625232959), I found this...
Apparently, `sOPTIMIZE_DEFAULT`, despite its name, isn't the default optimization mode - `sOPTIMIZE_NOMACRO` is, as this value is assigned to `pc_optimize` by default in `initglobals()`. https://github.com/pawn-lang/compiler/blob/289cfeb1268f833ae1796debbab1e464306296ca/source/compiler/sc1.c#L924 I think we should rename...
Removed the "`Remove unused duplicate functions from sc1.c`" commit, as I'm planning to move it into a separate PR.
Perhaps, we could create a new usage flag (say, `uREFUNUSED`) and mark global variables with that flag instead of `uREAD` and `uWRITTEN` when they are referenced from an unused function?...
> Possibly, but then you get the opposite problem - people not getting data compiled that they expect to be compiled Not sure what you mean by that exactly. If...
What about the idea of disabled-by-default warnings that I described in my previous post? Would you approve it?
> > > ```pawn > #pragma unused end > ``` > > Doesn't seem to bypass the warning. I think it should. Of course it wouldn't, you're using it when...
MCVE: ```Pawn main() { for (new x = 5; --x != 0;) { if (x == 2) { x = 1; goto lbl_cont; } x = 3; // false-positive warning...