View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000735 | LDMud | LPC Compiler/Preprocessor | public | 2010-03-11 04:13 | 2021-04-16 22:23 |
Reporter | Sorcerer | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | won't fix | ||
Summary | 0000735: pragma warn_only | ||||
Description | This is related to issue 734, but a suggestion of a different approach: introduce a pragma "warn_only" that will convert a defined set of compile-time errors into warnings (e.g. the disregard of nomask as in issue 734; a missing varargs; in combination with strong_types missing declarations; in combination with warn_missing_return a missing return). That way one has a means of introducing stricter coding standards without ending up with compile-time errors but instead the warnings will point to where things have to be fixed. | ||||
Tags | No tags attached. | ||||
External Data (URL) | |||||
related to | 0000734 | acknowledged | LDMud 3.7 | warn_nomask modifier |
|
warn_missing_return always only warns on missing returns, there are no errors in that case. The same is true for a missing varargs in an inheritee, in fact, that warning only occurs with pragam pedantic. Disregarding nomask by pragma has to be done carefully. The relevant pragma has to be the one in the program defining the nomask function in the first place (which somehow counters intuition), otherwise an inheritee could just disable all nomasks. |
|
Interestingly enough, I think Lars saw the pragma "pedantic" as the inverse to that which you propose: transforming warnings to errors. But a clear distinction which cases throw errors and which throw warnings never really existed, did it? |
|
Clear distinction? No. There is some gray area... IMHO: The more clearly something is (always) a programming error and the less often it is used, the more likely it will be a hard error... |
|
Several compiler errors result in an invalid program and must not allowed to become objects. Ignoring nomask has security implications we don't want to allow. Missing varargs or missing return is already only a warning, other messages regarding redefinition are warnings unless pedantic is given. Therefore we see little use in the suggested pragma. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-03-11 04:13 | Sorcerer | New Issue | |
2010-03-11 04:43 | zesstra | Note Added: 0001786 | |
2010-03-11 13:48 | _xtian_ | Note Added: 0001789 | |
2010-03-14 10:26 | zesstra | Relationship added | related to 0000734 |
2010-04-26 15:31 | zesstra | Note Added: 0001838 | |
2021-04-16 22:23 | Gnomi | Status | new => closed |
2021-04-16 22:23 | Gnomi | Resolution | open => won't fix |
2021-04-16 22:23 | Gnomi | Note Added: 0002618 |