public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix failing objc.dg/proto-lossage-4.m
@ 2017-08-10 10:46 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2017-08-10 10:46 UTC (permalink / raw)
  To: GCC Patches

With -m32 intptr_t can be just 'int', not 'long int', so accept that too.

Tested on x86_64-linux, applying to trunk.

2017-08-10  Marek Polacek  <polacek@redhat.com>

	* objc.dg/proto-lossage-4.m: Accept int/long int as intptr_t.

diff --git gcc/testsuite/objc.dg/proto-lossage-4.m gcc/testsuite/objc.dg/proto-lossage-4.m
index 4c6b560bab4..c9c80b7c427 100644
--- gcc/testsuite/objc.dg/proto-lossage-4.m
+++ gcc/testsuite/objc.dg/proto-lossage-4.m
@@ -28,13 +28,13 @@ long foo(void) {
   receiver += [receiver anotherValue]; /* { dg-warning "invalid receiver type .intptr_t." } */
 
   receiver += [(Obj *)receiver someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment to 'intptr_t {aka long int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
+/* { dg-warning "assignment to 'intptr_t {aka (long )?int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
 
   receiver += [(Obj *)receiver anotherValue];
   receiver += [(Obj <Proto> *)receiver someValue];
   receiver += [(Obj <Proto> *)receiver anotherValue];
   receiver += [objrcvr someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment to 'intptr_t {aka long int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
+/* { dg-warning "assignment to 'intptr_t {aka (long )?int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
 
   receiver += [objrcvr anotherValue];
   receiver += [(Obj <Proto> *)objrcvr someValue];
@@ -42,7 +42,7 @@ long foo(void) {
   receiver += [objrcvr2 someValue];
   receiver += [objrcvr2 anotherValue];
   receiver += [(Obj *)objrcvr2 someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment to 'intptr_t {aka long int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
+/* { dg-warning "assignment to 'intptr_t {aka (long )?int}' from 'id' makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
 
   receiver += [(Obj *)objrcvr2 anotherValue];
 

	Marek

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-10  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10 10:46 [PATCH] Fix failing objc.dg/proto-lossage-4.m Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).