This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR java/9157: ICE on malformed ?: condition

Ranjit Mathew writes:
 >   This patch resolves PR java/9157. We were already
 > taking care of the fact that the "?" and the ":"
 > parts of a ?: operator could be artificially crafted
 > StringBuffers from expressions like "foo" + bar - we
 > need to also take care of this in the condition of
 > the ?: operator.
 > The first hunk removes a redundant "if (op2)" condition
 > that I happened to notice.
 > Tested on i686-pc-linux-gnu with Jacks included - produced
 > no new FAILs or XPASSes (:-().
 > OK for mainline?
 > BTW, how can I add a testcase for this PR - it used
 > to ICE before and should now fail with an error - there
 > is no "transition" w.r.t. to the failure status...

I suppose you could try doing a string match on the error message, but
that's a pain.

 > Bangalore, INDIA.    Web:
 > Index: ChangeLog
 > from  Ranjit Mathew  <>
 > 	PR java/9157
 > 	* parse.y (build_string_concatenation): Remove redundant if.
 > 	(patch_conditional_expr): Attempt to patch_string() the condition
 > 	of a ?: as well, in addition to its other operands.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]