PATCH: fix Obj-C++ typo
Ziemowit Laski
zlaski@apple.com
Thu Jan 20 01:01:00 GMT 2005
On 19 Jan 2005, at 16.49, Matt Austern wrote:
> I'm almost willing to commit this as obvious, but,...
>
> OK to commit to mainline?
>
> --Matt
>
>
>
> * typeck.c (comptypes): Handle return code from objc_comptypes
> correctly.
Ah, thanks for finding this. :-(
I have no C++ approval privileges, of course, but would point out that
in the C++ (i.e., non-ObjC++) case, the 'return' statement never gets
taken, either with your patch or without, so this looks perfectly safe.
--Zem
>
> Index: gcc/cp/typeck.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
> retrieving revision 1.606
> diff -p -r1.606 typeck.c
> *** gcc/cp/typeck.c 22 Dec 2004 18:00:39 -0000 1.606
> --- gcc/cp/typeck.c 20 Jan 2005 00:47:52 -0000
> *************** comptypes (tree t1, tree t2, int strict)
> *** 1020,1026 ****
>
> /* We may be dealing with Objective-C instances... */
> if (TREE_CODE (t1) == RECORD_TYPE
> ! && (retval = objc_comptypes (t1, t2, 0) >= 0))
> return retval;
> /* ...but fall through if we are not. */
>
> --- 1020,1026 ----
>
> /* We may be dealing with Objective-C instances... */
> if (TREE_CODE (t1) == RECORD_TYPE
> ! && ((retval = objc_comptypes (t1, t2, 0)) >= 0))
> return retval;
> /* ...but fall through if we are not. */
>
More information about the Gcc-patches
mailing list