From: Jesse Rosenstock Date: Tue, 13 Aug 2002 22:29:23 +0000 (+0000) Subject: For PR java/7483: X-Git-Tag: releases/gcc-3.3.0~3304 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee1884cb9bc40f47f0fd2feedbbb0481bc1d7f7e;p=thirdparty%2Fgcc.git For PR java/7483: 2002-08-13 Jesse Rosenstock For PR java/7483: * parse.y (build_assertion): Invert return from desiredAssertionStatus. From-SVN: r56264 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 28038889b8cc..da858f272b92 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2002-08-13 Jesse Rosenstock + + For PR java/7483: + * parse.y (build_assertion): Invert return from + desiredAssertionStatus. + 2002-08-08 Bryce McKinlay * jcf-write.c (get_access_flags): Return correct access flags for diff --git a/gcc/java/parse.y b/gcc/java/parse.y index dac6602261ce..2a581a156c7a 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -15353,6 +15353,12 @@ build_assertion (location, condition, value) call = build (CALL_EXPR, NULL_TREE, id, NULL_TREE, NULL_TREE); call = make_qualified_primary (classdollar, call, location); TREE_SIDE_EFFECTS (call) = 1; + + /* Invert to obtain !CLASS.desiredAssertionStatus(). This may + seem odd, but we do it to generate code identical to that of + the JDK. */ + call = build1 (TRUTH_NOT_EXPR, NULL_TREE, call); + TREE_SIDE_EFFECTS (call) = 1; DECL_INITIAL (field) = call; /* Record the initializer in the initializer statement list. */