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

See Also:


Attachments

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
    sdojfosdjfdoj
    dfsjodfjoisdjf
sdfpsodifpsd
{
+
}
20-399304-92034
    endif

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.