This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] PR32778 - pedantic warning: intrinsics that are GNU extensions not part of -std=gnu


On Sat, Jul 21, 2007 at 07:45:36PM +0200, Daniel Franke wrote:
> :ADDPATCH fortran:
> 
> gcc/fortran:
> 2007-07-21  Daniel Franke  <franke.daniel@gmail.com>
> 
> 	PR fortran/32778
> 	* intrinsic.c (add_sym): Do not exclude any symbols, even if not part 
> 	of the selected standard.
> 	(make generic): Likewise.
> 	(make alias): Likewise, set standard the alias belongs to.
> 	(check_intrinsic_standard): Change return value to try.
> 	(gfc_intrinsic_func_interface): Check return value of above function.
> 	(gfc_intrinsic_sub_interface): Likewise.
> 
> gcc/testsuite:
> 2007-07-21  Daniel Franke  <franke.daniel@gmail.com>
> 
> 	PR fortran/32778
> 	* gfortran.dg/imag_2.f: Removed
> 	* gfortran.dg/warn_std_1.f90: New test.
> 	* gfortran.dg/warn_std_2.f90: New test.
> 	* gfortran.dg/warn_std_3.f90: New test.
> 
> The test imag_2.f was removed as it essentially tests the same as the 
> warn_std_* tests, only less extensive.
> 
> Regression tested on i686-pc-linux-gnu. Ok for trunk?
> 

I could be wrong (still building and testing), but it appears
that this patch removes the usefulness of -fall-intrinsics.
The original intent of this option was to permit someone to
check the conformance of  one's code to either -std=f95
and -std=f2003 while permitting nonstandard GNU intrinsic
procedures.


I suspect you need to modify this

+  /* Do not warn about GNU-extensions if -std=gnu.  */
+  if (!gfc_option.warn_nonstd_intrinsics
+      || (standard == GFC_STD_GNU && gfc_option.warn_std & GFC_STD_GNU))
+    return SUCCESS;

to

+  /* Do not warn about GNU-extensions if -std=gnu.  */
+  if (!gfc_option.warn_nonstd_intrinsics
+      || (standard == GFC_STD_GNU && gfc_option.warn_std & GFC_STD_GNU)
	   ||  gfc_option.flag_all_intrinsics == 0)
+    return SUCCESS;



-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]