Commit 5f42ddb0 by Kaveh R. Ghazi Committed by Kaveh Ghazi

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
parent c6c81aa6
2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 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 <kargls@comcast.net> 2005-03-05 Steven G. Kargl <kargls@comcast.net>
PR 19936 PR 19936
......
...@@ -48,14 +48,8 @@ GFORTRAN_CROSS_NAME := $(shell echo gfortran|sed '$(program_transform_cross_name ...@@ -48,14 +48,8 @@ GFORTRAN_CROSS_NAME := $(shell echo gfortran|sed '$(program_transform_cross_name
#^L #^L
# This is in addition to the warning flags defined by default. # Use strict warnings for this front end.
# You can use it to enable/disable warnings globally or for specific fortran-warn = $(STRICT_WARN) -Wno-error
# 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.
# These are the groups of object files we have. The F95_PARSER_OBJS are # 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 # all the front end files, the F95_OBJS are the files for the translation
......
...@@ -186,7 +186,7 @@ var_element (gfc_data_variable * new) ...@@ -186,7 +186,7 @@ var_element (gfc_data_variable * new)
return MATCH_ERROR; 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) if (sym->attr.in_common)
/* See if sym is in the blank common block. */ /* See if sym is in the blank common block. */
for (t = &sym->ns->blank_common; t; t = t->common_next) for (t = &sym->ns->blank_common; t; t = t->common_next)
......
...@@ -218,7 +218,7 @@ interface_type; ...@@ -218,7 +218,7 @@ interface_type;
/* Symbol flavors: these are all mutually exclusive. /* Symbol flavors: these are all mutually exclusive.
10 elements = 4 bits. */ 10 elements = 4 bits. */
typedef enum typedef enum sym_flavor
{ {
FL_UNKNOWN = 0, FL_PROGRAM, FL_BLOCK_DATA, FL_MODULE, FL_VARIABLE, FL_UNKNOWN = 0, FL_PROGRAM, FL_BLOCK_DATA, FL_MODULE, FL_VARIABLE,
FL_PARAMETER, FL_LABEL, FL_PROCEDURE, FL_DERIVED, FL_NAMELIST FL_PARAMETER, FL_LABEL, FL_PROCEDURE, FL_DERIVED, FL_NAMELIST
...@@ -226,27 +226,27 @@ typedef enum ...@@ -226,27 +226,27 @@ typedef enum
sym_flavor; sym_flavor;
/* Procedure types. 7 elements = 3 bits. */ /* Procedure types. 7 elements = 3 bits. */
typedef enum typedef enum procedure_type
{ PROC_UNKNOWN, PROC_MODULE, PROC_INTERNAL, PROC_DUMMY, { PROC_UNKNOWN, PROC_MODULE, PROC_INTERNAL, PROC_DUMMY,
PROC_INTRINSIC, PROC_ST_FUNCTION, PROC_EXTERNAL PROC_INTRINSIC, PROC_ST_FUNCTION, PROC_EXTERNAL
} }
procedure_type; procedure_type;
/* Intent types. */ /* Intent types. */
typedef enum typedef enum sym_intent
{ INTENT_UNKNOWN = 0, INTENT_IN, INTENT_OUT, INTENT_INOUT { INTENT_UNKNOWN = 0, INTENT_IN, INTENT_OUT, INTENT_INOUT
} }
sym_intent; sym_intent;
/* Access types. */ /* Access types. */
typedef enum typedef enum gfc_access
{ ACCESS_UNKNOWN = 0, ACCESS_PUBLIC, ACCESS_PRIVATE, { ACCESS_UNKNOWN = 0, ACCESS_PUBLIC, ACCESS_PRIVATE
} }
gfc_access; gfc_access;
/* Flags to keep track of where an interface came from. /* Flags to keep track of where an interface came from.
4 elements = 2 bits. */ 4 elements = 2 bits. */
typedef enum typedef enum ifsrc
{ IFSRC_UNKNOWN = 0, IFSRC_DECL, IFSRC_IFBODY, IFSRC_USAGE { IFSRC_UNKNOWN = 0, IFSRC_DECL, IFSRC_IFBODY, IFSRC_USAGE
} }
ifsrc; ifsrc;
...@@ -431,12 +431,12 @@ typedef struct ...@@ -431,12 +431,12 @@ typedef struct
unsigned referenced:1; unsigned referenced:1;
/* Mutually exclusive multibit attributes. */ /* Mutually exclusive multibit attributes. */
gfc_access access:2; ENUM_BITFIELD (gfc_access) access:2;
sym_intent intent:2; ENUM_BITFIELD (sym_intent) intent:2;
sym_flavor flavor:4; ENUM_BITFIELD (sym_flavor) flavor:4;
ifsrc if_source:2; ENUM_BITFIELD (ifsrc) if_source:2;
procedure_type proc:3; ENUM_BITFIELD (procedure_type) proc:3;
} }
symbol_attribute; symbol_attribute;
......
...@@ -437,7 +437,7 @@ gfc_get_backend_locus (locus * loc) ...@@ -437,7 +437,7 @@ gfc_get_backend_locus (locus * loc)
{ {
loc->lb = gfc_getmem (sizeof (gfc_linebuf)); loc->lb = gfc_getmem (sizeof (gfc_linebuf));
#ifdef USE_MAPPED_LOCATION #ifdef USE_MAPPED_LOCATION
loc->lb->location = input_location; // FIXME adjust?? loc->lb->location = input_location; /* FIXME adjust?? */
#else #else
loc->lb->linenum = input_line - 1; loc->lb->linenum = input_line - 1;
#endif #endif
......
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