Patchwork [fortran] Enforce F2003 C1202

login
register
mail settings
Submitter Tobias Burnus
Date Sept. 25, 2010, 7:07 a.m.
Message ID <4C9D9FA4.8040607@net-b.de>
Download mbox | patch
Permalink /patch/65737/
State New
Headers show

Comments

Tobias Burnus - Sept. 25, 2010, 7:07 a.m.
Steve Kargl wrote:
> On Fri, Sep 24, 2010 at 10:33:32PM -0700, Jerry DeLisle wrote:
>> On 09/24/2010 08:42 PM, Steve Kargl wrote:
>>> Regression tested on x86_64-*-freebsd.
>>> OK for trunk
> Committed revision 164616.

The committed patch did not compile here as you strip off the "const" 
from the pointer - given an error (due to -Werror). Thus, I have 
committed the attached patch as obvious.

Rev. 164617,

Tobias
Steve Kargl - Sept. 25, 2010, 2:18 p.m.
On Sat, Sep 25, 2010 at 09:07:16AM +0200, Tobias Burnus wrote:
>  Steve Kargl wrote:
> >On Fri, Sep 24, 2010 at 10:33:32PM -0700, Jerry DeLisle wrote:
> >>On 09/24/2010 08:42 PM, Steve Kargl wrote:
> >>>Regression tested on x86_64-*-freebsd.
> >>>OK for trunk
> >Committed revision 164616.
> 
> The committed patch did not compile here as you strip off the "const" 
> from the pointer - given an error (due to -Werror). Thus, I have 
> committed the attached patch as obvious.
> 

That's odd.  It compiled fine for me.  Thanks for 
cleaning up after me.

Patch

Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c	(Revision 164616)
+++ gcc/fortran/interface.c	(Arbeitskopie)
@@ -320,7 +320,7 @@ 
 	    }
 	  else
 	    {
-	      char *s1, *s2;
+	      const char *s1, *s2;
 	      s1 = gfc_op2string (current_interface.op);
 	      s2 = gfc_op2string (op);
 
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(Revision 164616)
+++ gcc/fortran/ChangeLog	(Arbeitskopie)
@@ -1,6 +1,11 @@ 
+2010-09-25  Tobias Burnus  <burnus@net-b.de>
+
+	* interface.c (gfc_match_end_interface): Constify char pointer
+	to fix warning.
+
 2010-09-24  Steven G. Kargl  < kargl@gcc.gnu.org>
 
-	* fortran/interface.c (gfc_match_end_interface): Deal with user defined
+	* interface.c (gfc_match_end_interface): Deal with user defined
 	operators that overload rational operators and C1202.
 
 2010-09-24  Tobias Burnus  <burnus@net-b.de>