Bug 100297 - [patch] fix name clash of assert macro in debug.hpp with libc's assert macro

John Rose john.r.rose at oracle.com
Tue Feb 19 13:05:51 PST 2013


On Feb 19, 2013, at 7:55 AM, Péter Radics <mitchnull at gmail.com> wrote:

> it would be worthwhile fixing this issue.

I added the following text to bug 8007770, which gives reasons not to take this action:

> I count about 15,000 occurrences of assert in our sources. 
> The proposed rename would therefore be a disruptive change. 
> Patches and change sets would no longer apply across that change, leading to maintenance costs, especially back-porting bug fixes. 
> Thus, a mere claim of "would be prudent to conform exactly to the standard" is not enough grounds to accept this change. 
> 
> Since 'assert' macros are common programming practice, we can expect (or request, if necessary) that the C++ standard libraries provide an op-out mechanism, such as '#undef assert' or '-DNDEBUG'. 
> 
> For a reference on NDEBUG, see: http://www.cplusplus.com/reference/cassert/assert/

— John


More information about the hotspot-dev mailing list