public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH]: Fix a few remaining -Wc++-compat warnings
@ 2008-06-26 15:33 Kaveh R. GHAZI
  2008-06-26 15:53 ` Nathan Froyd
  0 siblings, 1 reply; 12+ messages in thread
From: Kaveh R. GHAZI @ 2008-06-26 15:33 UTC (permalink / raw)
  To: gcc-patches; +Cc: dnovillo, gdr, iant, richard.guenther

This patch fixes a few of the remaining -Wc++-compat warnings I get
during a regular bootstrap.  Some notes:

1.  In df-scan.c the xrealloc multiplied by sizeof (struct df_ref*),
however the lhs wanted a type of struct df_mw_hardreg **.  This type
mismatch seems to have worked silently because the sizeof pointers are all
the same.  I fixed it.

2.  In varasm.c, we have another type mismatch.  The type involved is
union section, and the allocation happens in the union member types. I
don't know why, maybe perhaps to save space?  I don't know if this is
significant, but I used the containing union type.

3.  The remaining warnings are:

 > bitmap.c:357: warning: request for implicit conversion from 'void *' to 'struct bitmap_head_def *' not permitted in C++
 > bitmap.c:392: warning: request for implicit conversion from 'void *' to 'struct bitmap_element *' not permitted inC++
 > dominance.c:1324: warning: request for implicit conversion from 'void *' to 'bitmap' not permitted in C++
 > java/jcf-io.c:404: warning: request for implicit conversion from 'void *' to 'int (*)(const struct dirent *)' not permitted in C++


I can't wrap my brain around the bitmap.c cases, the sides of the
assignments are really different types.  Someone appears to have done this
intentionally and cast it, but I can't figure it out.

The dominance.c case is a normal void*->T* instance, but can't be easily
cast away.  The line in question has a call to BITMAP_FREE, the definition
is:

 > #define BITMAP_FREE(BITMAP)			\
 > 	((void)(bitmap_obstack_free (BITMAP), (BITMAP) = NULL))

If we add a cast, then we get a (pedantic?) warning about a cast
expression in the LHS of the assignment.

Finally the java/jcf-io.c case is a problem with varying declarations of
scandir() on different platforms.  This probably needs autoconf.

Thoughts on these, especially whether #2 is okay and how to solve the
warnings in #3, would be appreciated.

Bootstrapped on x86_64-unknown-linux-gnu, no regressions.

Okay for mainline?

		Thanks,
		--Kaveh


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

	* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
	* df-scan.c (df_notes_rescan): Likewise.
	* ggc-page.c (set_page_table_entry): Likewise.
	* intl.c (gcc_gettext_width): Likewise.
	* varasm.c (get_unnamed_section, get_noswitch_section,
	get_section): Likewise.

diff -rup orig/egcc-SVN20080626/gcc/alloc-pool.c egcc-SVN20080626/gcc/alloc-pool.c
--- orig/egcc-SVN20080626/gcc/alloc-pool.c	2008-03-14 00:39:19.000000000 +0100
+++ egcc-SVN20080626/gcc/alloc-pool.c	2008-06-26 09:47:46.000000000 +0200
@@ -145,7 +145,7 @@ create_alloc_pool (const char *name, siz
   pool_size = sizeof (struct alloc_pool_def);

   /* and allocate that much memory.  */
-  pool = xmalloc (pool_size);
+  pool = XNEW (struct alloc_pool_def);

   /* Now init the various pieces of our pool structure.  */
   pool->name = /*xstrdup (name)*/name;
diff -rup orig/egcc-SVN20080626/gcc/df-scan.c egcc-SVN20080626/gcc/df-scan.c
--- orig/egcc-SVN20080626/gcc/df-scan.c	2008-06-26 02:34:32.000000000 +0200
+++ egcc-SVN20080626/gcc/df-scan.c	2008-06-26 09:47:46.000000000 +0200
@@ -2082,9 +2082,9 @@ df_notes_rescan (rtx insn)
 	      if (collection_rec.next_mw > num_deleted)
 		{
 		  insn_info->mw_hardregs =
-		    xrealloc (insn_info->mw_hardregs,
-			      (count + 1 + collection_rec.next_mw)
-			      * sizeof (struct df_ref*));
+		    XRESIZEVEC (struct df_mw_hardreg *,
+				insn_info->mw_hardregs,
+				count + 1 + collection_rec.next_mw);
 		}
 	      memcpy (&insn_info->mw_hardregs[count], collection_rec.mw_vec,
 		      (collection_rec.next_mw + 1) * sizeof (struct df_mw_hardreg *));
diff -rup orig/egcc-SVN20080626/gcc/ggc-page.c egcc-SVN20080626/gcc/ggc-page.c
--- orig/egcc-SVN20080626/gcc/ggc-page.c	2008-06-26 02:34:32.000000000 +0200
+++ egcc-SVN20080626/gcc/ggc-page.c	2008-06-26 09:47:46.000000000 +0200
@@ -610,7 +610,7 @@ set_page_table_entry (void *p, page_entr
       goto found;

   /* Not found -- allocate a new table.  */
-  table = xcalloc (1, sizeof(*table));
+  table = XCNEW (struct page_table_chain);
   table->next = G.lookup;
   table->high_bits = high_bits;
   G.lookup = table;
diff -rup orig/egcc-SVN20080626/gcc/intl.c egcc-SVN20080626/gcc/intl.c
--- orig/egcc-SVN20080626/gcc/intl.c	2008-03-14 00:34:27.000000000 +0100
+++ egcc-SVN20080626/gcc/intl.c	2008-06-26 10:39:07.000000000 +0200
@@ -91,7 +91,7 @@ size_t
 gcc_gettext_width (const char *msgstr)
 {
   size_t nwcs = mbstowcs (0, msgstr, 0);
-  wchar_t *wmsgstr = alloca ((nwcs + 1) * sizeof (wchar_t));
+  wchar_t *wmsgstr = XALLOCAVEC (wchar_t, nwcs + 1);

   mbstowcs (wmsgstr, msgstr, nwcs + 1);
   return wcswidth (wmsgstr, nwcs);
diff -rup orig/egcc-SVN20080626/gcc/varasm.c egcc-SVN20080626/gcc/varasm.c
--- orig/egcc-SVN20080626/gcc/varasm.c	2008-06-20 20:46:26.000000000 +0200
+++ egcc-SVN20080626/gcc/varasm.c	2008-06-26 09:47:46.000000000 +0200
@@ -518,7 +518,7 @@ get_unnamed_section (unsigned int flags,
 {
   section *sect;

-  sect = ggc_alloc (sizeof (struct unnamed_section));
+  sect = GGC_NEW (section);
   sect->unnamed.common.flags = flags | SECTION_UNNAMED;
   sect->unnamed.callback = callback;
   sect->unnamed.data = data;
@@ -535,7 +535,7 @@ get_noswitch_section (unsigned int flags
 {
   section *sect;

-  sect = ggc_alloc (sizeof (struct unnamed_section));
+  sect = GGC_NEW (section);
   sect->noswitch.common.flags = flags | SECTION_NOSWITCH;
   sect->noswitch.callback = callback;

@@ -556,7 +556,7 @@ get_section (const char *name, unsigned
   flags |= SECTION_NAMED;
   if (*slot == NULL)
     {
-      sect = ggc_alloc (sizeof (struct named_section));
+      sect = GGC_NEW (section);
       sect->named.common.flags = flags;
       sect->named.name = ggc_strdup (name);
       sect->named.decl = decl;

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

* Re: [PATCH]: Fix a few remaining -Wc++-compat warnings
  2008-06-26 15:33 [PATCH]: Fix a few remaining -Wc++-compat warnings Kaveh R. GHAZI
@ 2008-06-26 15:53 ` Nathan Froyd
  2008-06-26 18:36   ` Kaveh R. Ghazi
  0 siblings, 1 reply; 12+ messages in thread
From: Nathan Froyd @ 2008-06-26 15:53 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: gcc-patches, dnovillo, gdr, iant, richard.guenther

On Thu, Jun 26, 2008 at 11:29:59AM -0400, Kaveh R. GHAZI wrote:
> --- orig/egcc-SVN20080626/gcc/alloc-pool.c	2008-03-14 00:39:19.000000000 +0100
> +++ egcc-SVN20080626/gcc/alloc-pool.c	2008-06-26 09:47:46.000000000 +0200
> @@ -145,7 +145,7 @@ create_alloc_pool (const char *name, siz
>    pool_size = sizeof (struct alloc_pool_def);

This assignment and variable appear to be unnecessary now.

>    /* and allocate that much memory.  */
> -  pool = xmalloc (pool_size);
> +  pool = XNEW (struct alloc_pool_def);

-Nathan

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

* Re: [PATCH]: Fix a few remaining -Wc++-compat warnings
  2008-06-26 15:53 ` Nathan Froyd
@ 2008-06-26 18:36   ` Kaveh R. Ghazi
  2008-06-26 20:34     ` Tom Tromey
  2008-06-27  1:01     ` [PATCH take 2]: " Kaveh R. GHAZI
  0 siblings, 2 replies; 12+ messages in thread
From: Kaveh R. Ghazi @ 2008-06-26 18:36 UTC (permalink / raw)
  To: Nathan Froyd; +Cc: gcc-patches, dnovillo, gdr, iant, richard.guenther

From: "Nathan Froyd" <froydnj@codesourcery.com>

> On Thu, Jun 26, 2008 at 11:29:59AM -0400, Kaveh R. GHAZI wrote:
>> --- orig/egcc-SVN20080626/gcc/alloc-pool.c 2008-03-14 00:39:19.000000000 
>> +0100
>> +++ egcc-SVN20080626/gcc/alloc-pool.c 2008-06-26 09:47:46.000000000 +0200
>> @@ -145,7 +145,7 @@ create_alloc_pool (const char *name, siz
>>    pool_size = sizeof (struct alloc_pool_def);
>
> This assignment and variable appear to be unnecessary now.
>
>>    /* and allocate that much memory.  */
>> -  pool = xmalloc (pool_size);
>> +  pool = XNEW (struct alloc_pool_def);
>
> -Nathan

Okay, I'll take it out.  Wish GCC would warn about these assigned but 
otherwise unused variables!


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

* Re: [PATCH]: Fix a few remaining -Wc++-compat warnings
  2008-06-26 18:36   ` Kaveh R. Ghazi
@ 2008-06-26 20:34     ` Tom Tromey
  2008-06-26 20:42       ` Thomas Neumann
  2008-06-26 20:47       ` Kaveh R. Ghazi
  2008-06-27  1:01     ` [PATCH take 2]: " Kaveh R. GHAZI
  1 sibling, 2 replies; 12+ messages in thread
From: Tom Tromey @ 2008-06-26 20:34 UTC (permalink / raw)
  To: Kaveh R. Ghazi
  Cc: Nathan Froyd, gcc-patches, dnovillo, gdr, iant, richard.guenther

>>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:

Kaveh> Okay, I'll take it out.  Wish GCC would warn about these assigned but
Kaveh> otherwise unused variables!

I've seen this come up before -- there are a few such variables in the
C FE and someone put a patch (unreviewed AFAIK) in bugzilla.  Do we
have a bug requesting this feature?  If not would you mind filing one?

Tom

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

* Re: [PATCH]: Fix a few remaining -Wc++-compat warnings
  2008-06-26 20:34     ` Tom Tromey
@ 2008-06-26 20:42       ` Thomas Neumann
  2008-06-26 20:47       ` Kaveh R. Ghazi
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Neumann @ 2008-06-26 20:42 UTC (permalink / raw)
  To: gcc-patches

> I've seen this come up before -- there are a few such variables in the
> C FE and someone put a patch (unreviewed AFAIK) in bugzilla.  Do we
> have a bug requesting this feature?  If not would you mind filing one?

I requested it once as bug 16517 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16517)
but it was closed as invalid...

Thomas


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

* Re: [PATCH]: Fix a few remaining -Wc++-compat warnings
  2008-06-26 20:34     ` Tom Tromey
  2008-06-26 20:42       ` Thomas Neumann
@ 2008-06-26 20:47       ` Kaveh R. Ghazi
  1 sibling, 0 replies; 12+ messages in thread
From: Kaveh R. Ghazi @ 2008-06-26 20:47 UTC (permalink / raw)
  To: tromey; +Cc: Nathan Froyd, gcc-patches, dnovillo, gdr, iant, richard.guenther

From: "Tom Tromey" <tromey@redhat.com>

>>>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
>
> Kaveh> Okay, I'll take it out.  Wish GCC would warn about these assigned 
> but
> Kaveh> otherwise unused variables!
>
> I've seen this come up before -- there are a few such variables in the
> C FE and someone put a patch (unreviewed AFAIK) in bugzilla.  Do we
> have a bug requesting this feature?  If not would you mind filing one?
>
> Tom

The PR is 18624.  There are some closed duplicate PRs which may have some 
patch attempts at the feature.  I don't know about patches to clean up 
instances of the warning.

--Kaveh

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

* [PATCH take 2]: Fix a few remaining -Wc++-compat warnings
  2008-06-26 18:36   ` Kaveh R. Ghazi
  2008-06-26 20:34     ` Tom Tromey
@ 2008-06-27  1:01     ` Kaveh R. GHAZI
  2008-06-29  3:49       ` Ian Lance Taylor
  1 sibling, 1 reply; 12+ messages in thread
From: Kaveh R. GHAZI @ 2008-06-27  1:01 UTC (permalink / raw)
  To: Nathan Froyd; +Cc: gcc-patches, dnovillo, gdr, iant, richard.guenther

This is take 2 of of my recent patch to eliminate a few last -Wc++-compat
warnings from the top level directory.  The change to this patch is that
it zaps the now unused variable pool_size in alloc-pool.c as requested by
Nathan.  Otherwise it's the same.


All the questions and caveats from the previous message remain. :-)
http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01658.html

Bootstrapped on x86_64-unknown-linux-gnu.

Okay for mainline?

		Thanks,
		--Kaveh


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

	* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
	* df-scan.c (df_notes_rescan): Likewise.
	* ggc-page.c (set_page_table_entry): Likewise.
	* intl.c (gcc_gettext_width): Likewise.
	* varasm.c (get_unnamed_section, get_noswitch_section,
	get_section): Likewise.

diff -rup orig/egcc-SVN20080626/gcc/alloc-pool.c egcc-SVN20080626/gcc/alloc-pool.c
--- orig/egcc-SVN20080626/gcc/alloc-pool.c	2008-03-14 00:39:19.000000000 +0100
+++ egcc-SVN20080626/gcc/alloc-pool.c	2008-06-27 02:14:48.000000000 +0200
@@ -119,7 +119,7 @@ alloc_pool
 create_alloc_pool (const char *name, size_t size, size_t num)
 {
   alloc_pool pool;
-  size_t pool_size, header_size;
+  size_t header_size;
 #ifdef GATHER_STATISTICS
   struct alloc_pool_descriptor *desc;
 #endif
@@ -141,11 +141,8 @@ create_alloc_pool (const char *name, siz
   /* Um, we can't really allocate 0 elements per block.  */
   gcc_assert (num);

-  /* Find the size of the pool structure, and the name.  */
-  pool_size = sizeof (struct alloc_pool_def);
-
-  /* and allocate that much memory.  */
-  pool = xmalloc (pool_size);
+  /* Allocate memory for the pool structure.  */
+  pool = XNEW (struct alloc_pool_def);

   /* Now init the various pieces of our pool structure.  */
   pool->name = /*xstrdup (name)*/name;
diff -rup orig/egcc-SVN20080626/gcc/df-scan.c egcc-SVN20080626/gcc/df-scan.c
--- orig/egcc-SVN20080626/gcc/df-scan.c	2008-06-26 02:34:32.000000000 +0200
+++ egcc-SVN20080626/gcc/df-scan.c	2008-06-27 02:13:05.000000000 +0200
@@ -2082,9 +2082,9 @@ df_notes_rescan (rtx insn)
 	      if (collection_rec.next_mw > num_deleted)
 		{
 		  insn_info->mw_hardregs =
-		    xrealloc (insn_info->mw_hardregs,
-			      (count + 1 + collection_rec.next_mw)
-			      * sizeof (struct df_ref*));
+		    XRESIZEVEC (struct df_mw_hardreg *,
+				insn_info->mw_hardregs,
+				count + 1 + collection_rec.next_mw);
 		}
 	      memcpy (&insn_info->mw_hardregs[count], collection_rec.mw_vec,
 		      (collection_rec.next_mw + 1) * sizeof (struct df_mw_hardreg *));
diff -rup orig/egcc-SVN20080626/gcc/ggc-page.c egcc-SVN20080626/gcc/ggc-page.c
--- orig/egcc-SVN20080626/gcc/ggc-page.c	2008-06-26 02:34:32.000000000 +0200
+++ egcc-SVN20080626/gcc/ggc-page.c	2008-06-27 02:13:05.000000000 +0200
@@ -610,7 +610,7 @@ set_page_table_entry (void *p, page_entr
       goto found;

   /* Not found -- allocate a new table.  */
-  table = xcalloc (1, sizeof(*table));
+  table = XCNEW (struct page_table_chain);
   table->next = G.lookup;
   table->high_bits = high_bits;
   G.lookup = table;
diff -rup orig/egcc-SVN20080626/gcc/intl.c egcc-SVN20080626/gcc/intl.c
--- orig/egcc-SVN20080626/gcc/intl.c	2008-03-14 00:34:27.000000000 +0100
+++ egcc-SVN20080626/gcc/intl.c	2008-06-27 02:13:05.000000000 +0200
@@ -91,7 +91,7 @@ size_t
 gcc_gettext_width (const char *msgstr)
 {
   size_t nwcs = mbstowcs (0, msgstr, 0);
-  wchar_t *wmsgstr = alloca ((nwcs + 1) * sizeof (wchar_t));
+  wchar_t *wmsgstr = XALLOCAVEC (wchar_t, nwcs + 1);

   mbstowcs (wmsgstr, msgstr, nwcs + 1);
   return wcswidth (wmsgstr, nwcs);
diff -rup orig/egcc-SVN20080626/gcc/varasm.c egcc-SVN20080626/gcc/varasm.c
--- orig/egcc-SVN20080626/gcc/varasm.c	2008-06-20 20:46:26.000000000 +0200
+++ egcc-SVN20080626/gcc/varasm.c	2008-06-27 02:13:05.000000000 +0200
@@ -518,7 +518,7 @@ get_unnamed_section (unsigned int flags,
 {
   section *sect;

-  sect = ggc_alloc (sizeof (struct unnamed_section));
+  sect = GGC_NEW (section);
   sect->unnamed.common.flags = flags | SECTION_UNNAMED;
   sect->unnamed.callback = callback;
   sect->unnamed.data = data;
@@ -535,7 +535,7 @@ get_noswitch_section (unsigned int flags
 {
   section *sect;

-  sect = ggc_alloc (sizeof (struct unnamed_section));
+  sect = GGC_NEW (section);
   sect->noswitch.common.flags = flags | SECTION_NOSWITCH;
   sect->noswitch.callback = callback;

@@ -556,7 +556,7 @@ get_section (const char *name, unsigned
   flags |= SECTION_NAMED;
   if (*slot == NULL)
     {
-      sect = ggc_alloc (sizeof (struct named_section));
+      sect = GGC_NEW (section);
       sect->named.common.flags = flags;
       sect->named.name = ggc_strdup (name);
       sect->named.decl = decl;

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

* Re: [PATCH take 2]: Fix a few remaining -Wc++-compat warnings
  2008-06-27  1:01     ` [PATCH take 2]: " Kaveh R. GHAZI
@ 2008-06-29  3:49       ` Ian Lance Taylor
  2008-06-29  5:54         ` Kaveh R. GHAZI
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Lance Taylor @ 2008-06-29  3:49 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Nathan Froyd, gcc-patches, dnovillo, gdr, richard.guenther

"Kaveh R. GHAZI" <ghazi@caip.rutgers.edu> writes:

> 2008-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
>
> 	* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
> 	* df-scan.c (df_notes_rescan): Likewise.
> 	* ggc-page.c (set_page_table_entry): Likewise.
> 	* intl.c (gcc_gettext_width): Likewise.
> 	* varasm.c (get_unnamed_section, get_noswitch_section,
> 	get_section): Likewise.

This is OK.

Thanks.

Ian

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

* Re: [PATCH take 2]: Fix a few remaining -Wc++-compat warnings
  2008-06-29  3:49       ` Ian Lance Taylor
@ 2008-06-29  5:54         ` Kaveh R. GHAZI
  2008-06-29 17:13           ` Tom Tromey
  2008-06-29 17:18           ` Ian Lance Taylor
  0 siblings, 2 replies; 12+ messages in thread
From: Kaveh R. GHAZI @ 2008-06-29  5:54 UTC (permalink / raw)
  To: Ian Lance Taylor
  Cc: Nathan Froyd, gcc-patches, dnovillo, gdr, richard.guenther

On Sat, 28 Jun 2008, Ian Lance Taylor wrote:

> "Kaveh R. GHAZI" <ghazi@caip.rutgers.edu> writes:
>
> > 2008-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
> >
> > 	* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
> > 	* df-scan.c (df_notes_rescan): Likewise.
> > 	* ggc-page.c (set_page_table_entry): Likewise.
> > 	* intl.c (gcc_gettext_width): Likewise.
> > 	* varasm.c (get_unnamed_section, get_noswitch_section,
> > 	get_section): Likewise.
>
> This is OK.
> Thanks.
> Ian

Thanks, installed.  Any comments on the questions I raised, especially #2?

http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01658.html

And also thoughts on how to solve the remaining warnings in #3?

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

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

* Re: [PATCH take 2]: Fix a few remaining -Wc++-compat warnings
  2008-06-29  5:54         ` Kaveh R. GHAZI
@ 2008-06-29 17:13           ` Tom Tromey
  2008-06-29 18:11             ` Kaveh R. GHAZI
  2008-06-29 17:18           ` Ian Lance Taylor
  1 sibling, 1 reply; 12+ messages in thread
From: Tom Tromey @ 2008-06-29 17:13 UTC (permalink / raw)
  To: Kaveh R. GHAZI
  Cc: Ian Lance Taylor, Nathan Froyd, gcc-patches, dnovillo, gdr,
	richard.guenther

>>>>> "Kaveh" == Kaveh R GHAZI <ghazi@caip.rutgers.edu> writes:

Kaveh> http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01658.html
Kaveh> And also thoughts on how to solve the remaining warnings in #3?

FWIW it would be fine with me if someone changed jcf-io.c to use
readdir rather than scandir.

Tom

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

* Re: [PATCH take 2]: Fix a few remaining -Wc++-compat warnings
  2008-06-29  5:54         ` Kaveh R. GHAZI
  2008-06-29 17:13           ` Tom Tromey
@ 2008-06-29 17:18           ` Ian Lance Taylor
  1 sibling, 0 replies; 12+ messages in thread
From: Ian Lance Taylor @ 2008-06-29 17:18 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Nathan Froyd, gcc-patches, dnovillo, gdr, richard.guenther

"Kaveh R. GHAZI" <ghazi@caip.rutgers.edu> writes:

> On Sat, 28 Jun 2008, Ian Lance Taylor wrote:
>
>> "Kaveh R. GHAZI" <ghazi@caip.rutgers.edu> writes:
>>
>> > 2008-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
>> >
>> > 	* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
>> > 	* df-scan.c (df_notes_rescan): Likewise.
>> > 	* ggc-page.c (set_page_table_entry): Likewise.
>> > 	* intl.c (gcc_gettext_width): Likewise.
>> > 	* varasm.c (get_unnamed_section, get_noswitch_section,
>> > 	get_section): Likewise.
>>
>> This is OK.
>> Thanks.
>> Ian
>
> Thanks, installed.  Any comments on the questions I raised, especially #2?

As far as I can see, unnamed_section is the largest field in the
union, plus we only create a fixed number of those structures.  I
doubt the change in the allocated size is meaningful.

I haven't looked at the remaining cases yet.

Ian

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

* Re: [PATCH take 2]: Fix a few remaining -Wc++-compat warnings
  2008-06-29 17:13           ` Tom Tromey
@ 2008-06-29 18:11             ` Kaveh R. GHAZI
  0 siblings, 0 replies; 12+ messages in thread
From: Kaveh R. GHAZI @ 2008-06-29 18:11 UTC (permalink / raw)
  To: Tom Tromey
  Cc: Ian Lance Taylor, Nathan Froyd, gcc-patches, dnovillo, gdr,
	richard.guenther

On Sun, 29 Jun 2008, Tom Tromey wrote:

> >>>>> "Kaveh" == Kaveh R GHAZI <ghazi@caip.rutgers.edu> writes:
>
> Kaveh> http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01658.html
> Kaveh> And also thoughts on how to solve the remaining warnings in #3?
>
> FWIW it would be fine with me if someone changed jcf-io.c to use
> readdir rather than scandir.
> Tom

Another option would be to put scandir/alphasort in libiberty.  (Maybe
call them xscandir/xalphasort to avoid prototype conflicts?)  We already
have strverscmp.c in libiberty which could be used to create
(x)versionsort so the functionality could be complete.

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

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

end of thread, other threads:[~2008-06-29 18:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-26 15:33 [PATCH]: Fix a few remaining -Wc++-compat warnings Kaveh R. GHAZI
2008-06-26 15:53 ` Nathan Froyd
2008-06-26 18:36   ` Kaveh R. Ghazi
2008-06-26 20:34     ` Tom Tromey
2008-06-26 20:42       ` Thomas Neumann
2008-06-26 20:47       ` Kaveh R. Ghazi
2008-06-27  1:01     ` [PATCH take 2]: " Kaveh R. GHAZI
2008-06-29  3:49       ` Ian Lance Taylor
2008-06-29  5:54         ` Kaveh R. GHAZI
2008-06-29 17:13           ` Tom Tromey
2008-06-29 18:11             ` Kaveh R. GHAZI
2008-06-29 17:18           ` Ian Lance Taylor

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