This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Patch/gfortran: Don't use type 'uint'
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: GCC-patches <gcc-patches at gcc dot gnu dot org>, 'GFORTRAN' <fortran at gcc dot gnu dot org>
- Cc: pault at gcc dot gnu dot org
- Date: Thu, 16 Feb 2006 14:37:51 +1300
- Subject: Patch/gfortran: Don't use type 'uint'
This change breaks gfortran build for mingw32 host, becase it introduced
the type 'uint' Mingw32 does not define the type 'uint'.
2006-01-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20869
PR fortran/20875
PR fortran/25024
* symbol.c (check_conflict): Add pointer valued elemental
functions and internal procedures with the external attribute
to the list of conflicts.
(gfc_add_attribute): New catch-all function to perform the
checking of symbol attributes for attribute declaration
statements.
* decl.c (attr_decl1): Call gfc_add_attribute for each of -
(gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
gfc_match_pointer, gfc_match_dimension, gfc_match_target):
Remove spurious calls to checks in symbol.c. Set the
attribute directly and use the call to attr_decl() for
checking.
* gfortran.h: Add prototype for gfc_add_attribute.
This fixes by using ANSI 'unsigned int' rather than 'uint'
Tested on i686-pc-mingw32
Danny Smith <dannysmith@users.sourceforeg.net>
* gfortran.h (gfc_add_attribute): Change uint to unsigned int.
* symbol.c (gfc_add_attribute): Likewise for definition.
* resolve.c (resolve_global_procedure): Likewise for variable
'type'.
Index: gcc/gcc/fortran/symbol.c
===================================================================
--- gcc/gcc/fortran/symbol.c (revision 111114)
+++ gcc/gcc/fortran/symbol.c (working copy)
@@ -604,7 +604,7 @@
/* Called from decl.c (attr_decl1) to check attributes, when declared
separately. */
try
-gfc_add_attribute (symbol_attribute * attr, locus * where, uint
attr_intent)
+gfc_add_attribute (symbol_attribute * attr, locus * where, unsigned int
+attr_intent)
{
if (check_used (attr, NULL, where)
Index: gcc/gcc/fortran/gfortran.h
===================================================================
--- gcc/gcc/fortran/gfortran.h (revision 111114)
+++ gcc/gcc/fortran/gfortran.h (working copy)
@@ -1784,7 +1784,7 @@
void gfc_set_sym_referenced (gfc_symbol * sym);
-try gfc_add_attribute (symbol_attribute *, locus *, uint);
+try gfc_add_attribute (symbol_attribute *, locus *, unsigned int);
try gfc_add_allocatable (symbol_attribute *, locus *);
try gfc_add_dimension (symbol_attribute *, const char *, locus *); try
gfc_add_external (symbol_attribute *, locus *);
Index: gcc/gcc/fortran/resolve.c
===================================================================
--- gcc/gcc/fortran/resolve.c (revision 111114)
+++ gcc/gcc/fortran/resolve.c (working copy)
@@ -916,7 +916,7 @@
resolve_global_procedure (gfc_symbol *sym, locus *where, int sub) {
gfc_gsymbol * gsym;
- uint type;
+ unsigned int type;
type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;