View Issue Details

IDProjectCategoryView StatusLast Update
0000735LDMudLPC Compiler/Preprocessorpublic2021-04-17 00:23
ReporterSorcerer Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionwon't fix 
Summary0000735: pragma warn_only
DescriptionThis 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.
TagsNo tags attached.
External Data (URL)

Relationships

related to 0000734 acknowledged LDMud 3.7 warn_nomask modifier 

Activities

zesstra

2010-03-11 05:43

administrator   ~0001786

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.

_xtian_

2010-03-11 14:48

reporter   ~0001789

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?

zesstra

2010-04-26 17:31

administrator   ~0001838

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...

Gnomi

2021-04-17 00:23

manager   ~0002618

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.

Issue History

Date Modified Username Field Change
2010-03-11 05:13 Sorcerer New Issue
2010-03-11 05:43 zesstra Note Added: 0001786
2010-03-11 14:48 _xtian_ Note Added: 0001789
2010-03-14 11:26 zesstra Relationship added related to 0000734
2010-04-26 17:31 zesstra Note Added: 0001838
2021-04-17 00:23 Gnomi Status new => closed
2021-04-17 00:23 Gnomi Resolution open => won't fix
2021-04-17 00:23 Gnomi Note Added: 0002618