From 5f42ddb0444cf8fd950bda51c4ef778c022df776 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sat, 12 Mar 2005 02:06:20 +0000 Subject: [PATCH] Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error. * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error. * decl.c, trans.c: Don't use C++ style comments. * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access, ifsrc): Give names to enums and use ENUM_BITFIELD. (gfc_access): Remove trailing comma. From-SVN: r96323 --- gcc/fortran/ChangeLog | 8 ++++++++ gcc/fortran/Make-lang.in | 10 ++-------- gcc/fortran/decl.c | 2 +- gcc/fortran/gfortran.h | 22 +++++++++++----------- gcc/fortran/trans.c | 2 +- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c22cd7bf77e..63b9cd1ccbf 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2005-03-11 Kaveh R. Ghazi + + * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error. + * decl.c, trans.c: Don't use C++ style comments. + * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access, + ifsrc): Give names to enums and use ENUM_BITFIELD. + (gfc_access): Remove trailing comma. + 2005-03-05 Steven G. Kargl PR 19936 diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index bdd8494c0d8..9bb34faba51 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -48,14 +48,8 @@ GFORTRAN_CROSS_NAME := $(shell echo gfortran|sed '$(program_transform_cross_name #^L -# This is in addition to the warning flags defined by default. -# You can use it to enable/disable warnings globally or for specific -# files, e.g. -# fortran-warn = -Wno-strict-prototypes -# fortran/arith.o-warn = -Wno-error -# -# We don't need these cheats, everything builds fine with all warnings -# enabled and -Werror. +# Use strict warnings for this front end. +fortran-warn = $(STRICT_WARN) -Wno-error # These are the groups of object files we have. The F95_PARSER_OBJS are # all the front end files, the F95_OBJS are the files for the translation diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index b3114cac2c1..45978c04ddf 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -186,7 +186,7 @@ var_element (gfc_data_variable * new) return MATCH_ERROR; } -#if 0 // TODO: Find out where to move this message +#if 0 /* TODO: Find out where to move this message */ if (sym->attr.in_common) /* See if sym is in the blank common block. */ for (t = &sym->ns->blank_common; t; t = t->common_next) diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 58efec944fb..8be1eb6f252 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -218,7 +218,7 @@ interface_type; /* Symbol flavors: these are all mutually exclusive. 10 elements = 4 bits. */ -typedef enum +typedef enum sym_flavor { FL_UNKNOWN = 0, FL_PROGRAM, FL_BLOCK_DATA, FL_MODULE, FL_VARIABLE, FL_PARAMETER, FL_LABEL, FL_PROCEDURE, FL_DERIVED, FL_NAMELIST @@ -226,27 +226,27 @@ typedef enum sym_flavor; /* Procedure types. 7 elements = 3 bits. */ -typedef enum +typedef enum procedure_type { PROC_UNKNOWN, PROC_MODULE, PROC_INTERNAL, PROC_DUMMY, PROC_INTRINSIC, PROC_ST_FUNCTION, PROC_EXTERNAL } procedure_type; /* Intent types. */ -typedef enum +typedef enum sym_intent { INTENT_UNKNOWN = 0, INTENT_IN, INTENT_OUT, INTENT_INOUT } sym_intent; /* Access types. */ -typedef enum -{ ACCESS_UNKNOWN = 0, ACCESS_PUBLIC, ACCESS_PRIVATE, +typedef enum gfc_access +{ ACCESS_UNKNOWN = 0, ACCESS_PUBLIC, ACCESS_PRIVATE } gfc_access; /* Flags to keep track of where an interface came from. 4 elements = 2 bits. */ -typedef enum +typedef enum ifsrc { IFSRC_UNKNOWN = 0, IFSRC_DECL, IFSRC_IFBODY, IFSRC_USAGE } ifsrc; @@ -431,12 +431,12 @@ typedef struct unsigned referenced:1; /* Mutually exclusive multibit attributes. */ - gfc_access access:2; - sym_intent intent:2; - sym_flavor flavor:4; - ifsrc if_source:2; + ENUM_BITFIELD (gfc_access) access:2; + ENUM_BITFIELD (sym_intent) intent:2; + ENUM_BITFIELD (sym_flavor) flavor:4; + ENUM_BITFIELD (ifsrc) if_source:2; - procedure_type proc:3; + ENUM_BITFIELD (procedure_type) proc:3; } symbol_attribute; diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index 147a98f432d..8c9d342c5c2 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -437,7 +437,7 @@ gfc_get_backend_locus (locus * loc) { loc->lb = gfc_getmem (sizeof (gfc_linebuf)); #ifdef USE_MAPPED_LOCATION - loc->lb->location = input_location; // FIXME adjust?? + loc->lb->location = input_location; /* FIXME adjust?? */ #else loc->lb->linenum = input_line - 1; #endif -- 2.30.2