You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interesting test case. The logic for resolving macros blindly took any ( as the start of macro arguments even when the define had no actual arguments. Which meant that in the following code everything inside the parenthesis was passed to the macro and then simply dropped resulting in bad code.
diff_pntr <=#`TCQ (wr_pntr - adj_rd_pntr_wr);
The short-term solution, which will be available in beta 4, is to look up if a macro needs arguments and only then look for a (
The medium-term solution is to error-check that the number of arguments used by a macro matches the expected number from the define and flag errors as appropriate. Today the plug-in assumes you pass it the correct amount of arguments and doesn't flag errors for it.
The following code generates an error at the ';' of line 13 where it shouldn't.
The error message in the comment marked with
//^
on line 14.Notice: Line 11 (with
#100
) works while the one with a macro definition fails.The text was updated successfully, but these errors were encountered: