public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch, libgfortran] Fix warning about mismatched type declarations.
@ 2018-09-02  4:03 Jerry DeLisle
  2018-09-02 11:49 ` Thomas Koenig
  0 siblings, 1 reply; 3+ messages in thread
From: Jerry DeLisle @ 2018-09-02  4:03 UTC (permalink / raw)
  To: fortran; +Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

All,

The subject patch fixes the declaration for the vlist argument of the 
formatted_dtio function pointer definition which currently gives a 
warnings during compilation for mismatched types.

Regression tested on x86_64-pc-linux.

OK for trunk?

Regards,

Jerry

2018-09-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/io.h: Change declaration of vlist type to
	gfc_full_array_i4 to eliminate warning for mismatched type.
	* io/format.c ((parse_format_list): Use gfc_full_array_i4.
	* io/io.h: Use gfc_full_array_i4.

[-- Attachment #2: submit.diff --]
[-- Type: text/x-patch, Size: 1634 bytes --]

diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index b4920aaf1f1..f5d3158d21d 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -1058,7 +1058,7 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
 	    {
 	      /* We have parsed the complete vlist so initialize the
 	         array descriptor and save it in the format node.  */
-	      gfc_array_i4 *vp = tail->u.udf.vlist;
+	      gfc_full_array_i4 *vp = tail->u.udf.vlist;
 	      GFC_DESCRIPTOR_DATA(vp) = xmalloc (i * sizeof(GFC_INTEGER_4));
 	      GFC_DIMENSION_SET(vp->dim[0],1, i, 1);
 	      memcpy (GFC_DESCRIPTOR_DATA(vp), temp, i * sizeof(GFC_INTEGER_4));
diff --git a/libgfortran/io/format.h b/libgfortran/io/format.h
index ad7e1c14b8f..19882bcf095 100644
--- a/libgfortran/io/format.h
+++ b/libgfortran/io/format.h
@@ -78,7 +78,7 @@ struct fnode
     {
       char *string;
       int string_len;
-      gfc_array_i4 *vlist;
+      gfc_full_array_i4 *vlist;
     }
     udf;  /* User Defined Format.  */
 
diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h
index d31213106ed..902eb412848 100644
--- a/libgfortran/io/io.h
+++ b/libgfortran/io/io.h
@@ -100,7 +100,8 @@ array_loop_spec;
 
 /* Subroutine formatted_dtio (struct, unit, iotype, v_list, iostat,
 			      iomsg, (_iotype), (_iomsg))  */
-typedef void (*formatted_dtio)(void *, GFC_INTEGER_4 *, char *, gfc_array_i4 *,
+typedef void (*formatted_dtio)(void *, GFC_INTEGER_4 *, char *,
+			       gfc_full_array_i4 *,
 			       GFC_INTEGER_4 *, char *,
 			       gfc_charlen_type, gfc_charlen_type);
 

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

* Re: [patch, libgfortran] Fix warning about mismatched type declarations.
  2018-09-02  4:03 [patch, libgfortran] Fix warning about mismatched type declarations Jerry DeLisle
@ 2018-09-02 11:49 ` Thomas Koenig
  2018-09-02 15:57   ` Jerry DeLisle
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Koenig @ 2018-09-02 11:49 UTC (permalink / raw)
  To: Jerry DeLisle, fortran; +Cc: GCC Patches

Hi Jerry,

> 
> The subject patch fixes the declaration for the vlist argument of the 
> formatted_dtio function pointer definition which currently gives a 
> warnings during compilation for mismatched types.
> 
> Regression tested on x86_64-pc-linux.
> 
> OK for trunk?

OK. Thanks!

Regards

	Thomas

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

* Re: [patch, libgfortran] Fix warning about mismatched type declarations.
  2018-09-02 11:49 ` Thomas Koenig
@ 2018-09-02 15:57   ` Jerry DeLisle
  0 siblings, 0 replies; 3+ messages in thread
From: Jerry DeLisle @ 2018-09-02 15:57 UTC (permalink / raw)
  To: Thomas Koenig, fortran; +Cc: GCC Patches

On 09/02/2018 04:49 AM, Thomas Koenig wrote:
> Hi Jerry,
> 
>>
>> The subject patch fixes the declaration for the vlist argument of the 
>> formatted_dtio function pointer definition which currently gives a 
>> warnings during compilation for mismatched types.
>>
>> Regression tested on x86_64-pc-linux.
>>
>> OK for trunk?
> 
> OK. Thanks!
> 
> Regards
> 
>      Thomas
> 

Committing to svn+ssh://jvdelisle@gcc.gnu.org/svn/gcc/trunk ...
	M	libgfortran/ChangeLog
	M	libgfortran/io/format.c
	M	libgfortran/io/format.h
	M	libgfortran/io/io.h
Committed r264043

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

end of thread, other threads:[~2018-09-02 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-02  4:03 [patch, libgfortran] Fix warning about mismatched type declarations Jerry DeLisle
2018-09-02 11:49 ` Thomas Koenig
2018-09-02 15:57   ` Jerry DeLisle

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