Bug 178 - Disabled code gives errors when it shouldn't
Summary: Disabled code gives errors when it shouldn't
Alias: None
Product: RMAC
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: PC Linux
: Normal normal
Assignee: Shamus Hammons
Depends on:
Reported: 2020-11-06 16:49 CST by ggn
Modified: 2022-12-25 15:07 CST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description ggn 2020-11-06 16:49:39 CST
Consider the following code:

    if 0

The 3 lines after the "if 0" are fine but the other 4 give out a "Error: syntax error; expected symbol". This certainly comes from procln.c and the check that first token must be a symbol, but does not skip that when "disabled" is true. IMO we should add a "||disabled" check in both places this check happens.

I really can't see a side effect adding this, happy to discuss it thought.
Comment 1 Shamus Hammons 2022-05-30 12:29:31 CDT
I agree that this is disconcerting, as I've had this bite me a few times in development of Project X ("whaddya mean there's an error in the disabled section???").  Just haven't taken the time to look at what would be required.  Looks like it should be a simple thing, though.
Comment 2 ggn 2022-12-25 15:07:30 CST
Oops, didn't notice this issue! So an attempt to fix this was committed in #199, but this still doesn't pass the test source mentioned in this ticket. 

A better approach is required :)