diff options
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/parse.y | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 2803888..da858f2 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com> + + For PR java/7483: + * parse.y (build_assertion): Invert return from + desiredAssertionStatus. + 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * jcf-write.c (get_access_flags): Return correct access flags for diff --git a/gcc/java/parse.y b/gcc/java/parse.y index dac6602..2a581a1 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. */ |