[m-rev.] for review: disable_warnings scope

Julien Fischer jfischer at opturion.com
Tue Jan 10 00:50:10 AEDT 2017


On Tue, 10 Jan 2017, Zoltan Somogyi wrote:

>> > index 9f48d8e..a5b3e9f 100644
>> > --- a/NEWS
>> > +++ b/NEWS
>> > @@ -114,6 +114,16 @@ Changes to the Mercury language:
>> >    the compiler now generates an error if the goal inside the scope
>> >    is not a switch on the named variable.
>> > 
>> > +* We have added a new kind of scope to the language for disabling warnings
>> > +  within the scope. A goal such as
>> > +
>> > +      disable_warnings [singleton_vars] (
>> > +        Goal
>> > +      )
>> > +
>> > +  is equivalent to Goal, with the exception that the compiler will not generate
>> > +  warnings about singleton variables inside Goal.
>> > +
>> >  * We have added an extension to include external files
>> >    in pragma foreign_decl and pragma foreign_code declarations.
>> 
>> Regarding syntax/naming I would consider calling it "suppress_warnings".
>> I don't think it's either better or worse, just something to consider.
>
> I prefer disable warnings. What do other people think?

"disable_warnings" is fine.

Julien.


More information about the reviews mailing list