public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH]: Fix PR bootstrap/36664 -Wc++-compat failure on darwin
@ 2008-06-29 17:49 Kaveh R. GHAZI
  2008-06-29 20:11 ` Dominique Dhumieres
  0 siblings, 1 reply; 3+ messages in thread
From: Kaveh R. GHAZI @ 2008-06-29 17:49 UTC (permalink / raw)
  To: gcc-patches; +Cc: dominiq

PR bootstrap/36664 is a -Wc++-compat failure on darwin in the file
config/darwin-driver.c.  I had done a cross-compile to darwin before
installing -Wc++-compat, however this particular file is entirely zapped
by a cpp conditional in a cross-compile configuration.  So it never came
up during my testing.

Anyway, I suspect this trivial patch fixes it.  Would someone test it on
darwin and make sure it fixes the problem?

If it does, okay to install?

		--Kaveh

2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* config/darwin-driver.c (darwin_default_min_version): Fix
	-Wc++-compat warnings.

diff -rup orig/egcc-SVN20080628/gcc/config/darwin-driver.c egcc-SVN20080628/gcc/config/darwin-driver.c
--- orig/egcc-SVN20080628/gcc/config/darwin-driver.c	2008-03-14 00:35:40.000000000 +0100
+++ egcc-SVN20080628/gcc/config/darwin-driver.c	2008-06-29 19:31:52.000000000 +0200
@@ -93,7 +93,7 @@ darwin_default_min_version (int * argc_p
 	&& macosx_deployment_target[0])
       {
 	++*argc_p;
-	*argv_p = xmalloc (sizeof (char *) * *argc_p);
+	*argv_p = XNEWVEC (char *, *argc_p);
 	(*argv_p)[0] = argv[0];
 	(*argv_p)[1] = concat ("-mmacosx-version-min=",
 			       macosx_deployment_target, NULL);
@@ -144,7 +144,7 @@ darwin_default_min_version (int * argc_p

   /* Add the new flag.  */
   ++*argc_p;
-  *argv_p = xmalloc (sizeof (char *) * *argc_p);
+  *argv_p = XNEWVEC (char *, *argc_p);
   (*argv_p)[0] = argv[0];
   (*argv_p)[1] = new_flag;
   memcpy (*argv_p + 2, argv + 1, (argc - 1) * sizeof (char *));

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]: Fix PR bootstrap/36664 -Wc++-compat failure on darwin
  2008-06-29 17:49 [PATCH]: Fix PR bootstrap/36664 -Wc++-compat failure on darwin Kaveh R. GHAZI
@ 2008-06-29 20:11 ` Dominique Dhumieres
  2008-07-01  2:09   ` Kaveh R. GHAZI
  0 siblings, 1 reply; 3+ messages in thread
From: Dominique Dhumieres @ 2008-06-29 20:11 UTC (permalink / raw)
  To: ghazi, gcc-patches; +Cc: dominiq

> Anyway, I suspect this trivial patch fixes it.  Would someone test it on
> darwin and make sure it fixes the problem?

With the patch now compiling fortran at stage 3 on i686-apple-darwin9.

Thanks for the patch.

Dominique

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]: Fix PR bootstrap/36664 -Wc++-compat failure on darwin
  2008-06-29 20:11 ` Dominique Dhumieres
@ 2008-07-01  2:09   ` Kaveh R. GHAZI
  0 siblings, 0 replies; 3+ messages in thread
From: Kaveh R. GHAZI @ 2008-07-01  2:09 UTC (permalink / raw)
  To: Dominique Dhumieres; +Cc: gcc-patches

On Sun, 29 Jun 2008, Dominique Dhumieres wrote:

> > Anyway, I suspect this trivial patch fixes it.  Would someone test it on
> > darwin and make sure it fixes the problem?
>
> With the patch now compiling fortran at stage 3 on i686-apple-darwin9.
> Thanks for the patch.
> Dominique

Given that this is a bootstrap failure on a primary platform, the simple
nature of the patch and the confirmation that it works, I've gone ahead
and installed it as obvious.

Let me know if there are any problems.

		Regards,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-01  2:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-29 17:49 [PATCH]: Fix PR bootstrap/36664 -Wc++-compat failure on darwin Kaveh R. GHAZI
2008-06-29 20:11 ` Dominique Dhumieres
2008-07-01  2:09   ` Kaveh R. GHAZI

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).