Mercury Bugs - mercury
View Issue Details
0000497mercuryFeature Requestpublic2020-04-03 15:132020-04-20 15:09
Reporterwangp 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000497: make disable_warning forwards compatible
DescriptionCurrently if the compiler does not recognise a warning name in a disable_warning(s) goal, it will report an error. I think we can reduce the severity of an unknown warning name from an error to a warning. This will provide a transition period in which a source file that has been updated to suppress warnings when using a newer compiler version, will still compile (with warnings) when using an older compiler.
TagsNo tags attached.
Attached Files

Notes
(0001077)
zs   
2020-04-04 02:43   
Feature implemented 2020 april 4.
(0001078)
wangp   
2020-04-04 13:07   
Thanks for taking a look.

However, the change is incomplete. When the clause is to be added in module_add_clause_2, MaybeBodyGoal is error1(...), the clause is not added, and compilation stops soon after.

BTW, this also affects duplicated names in disable_warnings scopes. The error message says "Error:" but the error spec has severity_warning.
(0001084)
wangp   
2020-04-20 15:08   
Fixed in commit 4f32c5082

Issue History
2020-04-03 15:13wangpNew Issue
2020-04-04 02:43zsAssigned To => zs
2020-04-04 02:43zsStatusnew => resolved
2020-04-04 02:43zsResolutionopen => fixed
2020-04-04 02:43zsNote Added: 0001077
2020-04-04 13:07wangpStatusresolved => feedback
2020-04-04 13:07wangpResolutionfixed => reopened
2020-04-04 13:07wangpNote Added: 0001078
2020-04-20 15:08wangpStatusfeedback => assigned
2020-04-20 15:08wangpResolutionreopened => fixed
2020-04-20 15:08wangpNote Added: 0001084
2020-04-20 15:09wangpStatusassigned => resolved