PR# 16795 No error or warning for unknown once key
Problem Report Summary
Submitter: prestoat2000
Category: Compiler
Priority: Medium
Date: 2010/05/31
Class: Bug
Severity: Non-critical
Number: 16795
Release: 6.6.83355
Confidential: No
Status: Closed
Responsible: jfiat_es
Environment: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.8) Gecko/20100226 Firefox/3.5.8
OpenSolaris svn_134 on x86
Synopsis: No error or warning for unknown once key
Description
I expected that an unknown once key (not one of "OBJECT", "PROCESS", "THREAD" - in upper, lower or mixed case) would be an error or at least a warning. But the compiler doesn't say anything. I think it should. In particular, typos are not detected. Is there some good reason for not checking this, such as a compatibility issue I'm not aware of? If this is indeed an omission, let me know and I will add an eweasel test (but you'll have to tell me the expected error or warning code).
To Reproduce
Problem Report Interactions
This issue is now addressed by revision rev#83614 For now, we raise an error if the key is not PROCESS or THREAD or OBJECT. In the future, when we implement support for free once key (needed to be able to reset a once, according to the specification), we will see how to handle the "typo" issue. I think we should accept free once key only in addition to existing PROCESS, THREAD, OBJECT keys. Then foo: FOO once ("PROCESS", "foo") ... foo: FOO once ("PROCESS", "foo", "bar") ... would be valid but not foo: FOO once ("foo") ... foo: FOO once ("foo", "bar") ... and obviously not the typo foo: FOO once ("PROCCCESSSSS") ... foo: FOO once ("PROCCCESSSSS", "bar") ... This would be a nice way to detect typo on the 3 predefined keys and still allow free keys But for now, this is not specified (this way). However, the next release will raise error if the once has free key(s).