<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">There's been a lot of discussion lately on the Apple objc-language list about how it'd be nice if there was a compiler switch to specify what class should be used for numeric, array, and dictionary literals, similar to -fconstant-string-class. So I went ahead and implemented -fobjc-numeric-literal-class (with -fobjc-array-literal-class and -fobjc-dictionary-literal-class to come)<div><br></div><div>The diff: <a href="http://pastie.org/3663039">http://pastie.org/3663039</a></div><div><br></div><div>Or at least I think I did. I'm not sure, because I haven't been able to test it properly. I tried to write a test case in SemaObjC based on the objc-literal-nsnumber test: </div><div><br></div><div><a href="http://pastie.org/3663058">http://pastie.org/3663058</a></div><div><br></div><div>but the test always fails, with this error: </div><div>"error: 'error' diagnostics seen but not expected: </div> (frontend): unknown argument: '-fobjc-numeric-literal-class=MYNumber'" <div><br></div><div>I also wrote a test program which seems to work correctly: <a href="http://pastie.org/3663088">http://pastie.org/3663088</a> (and gives the expected warning if I do @123.45 instead of @123.45f, as -numberWithDouble: isn't implemented on MYNumber)</div><div><br></div><div>Can someone help me get the test working, and then what's the process for getting a patch like this sent upstream (once I've got the array and dictionary literals done)?</div><div><br></div><div>-Daniel</div></body></html>