RFR: JDK-8013736: [launcher] cleanup code for correctness (original) (raw)

Martin Buchholz martinrb at google.com
Thu May 2 17:17:11 UTC 2013


This is global fix creep, but ...

these macros are also found in the hotspot sources. I would rewrite all the macros in the jdk to adopt the blessed style do { ... } while(0) and remove all comments in the jdk of the form /* next token must be ; */ If you want a macro that does nothing at all, you should define it do {} while (0) instead of defining it to the empty string.

On Thu, May 2, 2013 at 9:51 AM, Martin Buchholz <martinrb at google.com> wrote:

I would also be inclined to change == 0 to == NULL

This seems like another occasion to use the weird do { ... } while(0) trick to make the macro behave more like a statement. I might obfuscate the macro parameters to make collisions less likely, e.g. e => NCRVe

On Wed, May 1, 2013 at 12:33 PM, Kumar Srinivasan <_ _kumar.x.srinivasan at oracle.com> wrote: Hi, Please review simple fixes for code correctness in the launcher. http://cr.openjdk.java.net/**ksrini/8013736/webrev.0/<http://cr.openjdk.java.net/ksrini/8013736/webrev.0/> Thanks Kumar



More information about the core-libs-dev mailing list