Commit 7fe3aa08 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/53985 (-Wno-c-binding-type still prints a warning)

2012-07-17  Tobias Burnus  <burnus@net-b.de>

        PR fortran/53985
        * decl.c (gfc_verify_c_interop_param): Make warning conditional
        on -Wc-binding-type works and improve the wording.

2012-07-17  Tobias Burnus  <burnus@net-b.de>

        PR fortran/53985
        * gfortran.dg/bind_c_usage_26.f90: New.
        * gfortran.dg/bind_c_procs.f03: Add dg-options
        * "-Wc-binding-type".
        * gfortran.dg/bind_c_usage_13.f03: Ditto.
        * gfortran.dg/bind_c_usage_18.f90: Ditto.
        * gfortran.dg/interop_params.f03: Ditto.

From-SVN: r189586
parent 947296ca
2012-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/53985
* decl.c (gfc_verify_c_interop_param): Make warning conditional
on -Wc-binding-type works and improve the wording.
2012-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/52101
* decl.c (match_char_length): Extra argument, show obsolenscent
warning only if *length is used after the typename.
......
......@@ -1028,8 +1028,8 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
"because it is polymorphic",
sym->name, &(sym->declared_at),
sym->ns->proc_name->name);
else
gfc_warning ("Variable '%s' at %L is a parameter to the "
else if (gfc_option.warn_c_binding_type)
gfc_warning ("Variable '%s' at %L is a dummy argument of the "
"BIND(C) procedure '%s' but may not be C "
"interoperable",
sym->name, &(sym->declared_at),
......
2012-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/53985
* gfortran.dg/bind_c_usage_26.f90: New.
* gfortran.dg/bind_c_procs.f03: Add dg-options "-Wc-binding-type".
* gfortran.dg/bind_c_usage_13.f03: Ditto.
* gfortran.dg/bind_c_usage_18.f90: Ditto.
* gfortran.dg/interop_params.f03: Ditto.
2012-07-17 Jason Merrill <jason@redhat.com>
* g++.dg/template/inherit8.C: Adjust.
......
! { dg-do compile }
! { dg-options "-Wc-binding-type" }
module bind_c_procs
use, intrinsic :: iso_c_binding, only: c_int
......
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
! { dg-options "-fdump-tree-original -Wc-binding-type" }
!
! PR fortran/34079
! Character bind(c) arguments shall not pass the length as additional argument
......
! { dg-do compile }
! { dg-options "-Wc-binding-type" }
!
! PR fortran/38160
!
......
! { dg-do compile }
!
! PR fortran/53985
!
! Check that the (default) -Wno-c-binding-type works
! and no warning is printed.
!
! With -Wc-binding-type, one gets:
! Warning: Variable 'x' at (1) is a dummy argument to the BIND(C) procedure
! 'test' but may not be C interoperable )
!
subroutine test(x) bind(C)
integer :: x
end subroutine test
! { dg-do compile }
! { dg-options "-Wc-binding-type" }
module interop_params
use, intrinsic :: iso_c_binding
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment