aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorFritz O. Reese <fritzoreese@gmail.com>2016-11-10 21:54:48 +0000
committerFritz Reese <foreese@gcc.gnu.org>2016-11-10 21:54:48 +0000
commit05b8fcb4d2087c1544ebe3ad128711f12bcff022 (patch)
tree1b848f307ec6f5df1c86adced8e648c82b497701 /gcc/fortran/decl.c
parentf065303fcf9aa29bf376cf9db985b81d338d7709 (diff)
downloadgcc-05b8fcb4d2087c1544ebe3ad128711f12bcff022.zip
gcc-05b8fcb4d2087c1544ebe3ad128711f12bcff022.tar.gz
gcc-05b8fcb4d2087c1544ebe3ad128711f12bcff022.tar.bz2
Fix some whitespace.
gcc/fortran/ * decl.c (get_struct_decl, gfc_match_map, gfc_match_union): Fix whitespace. * interface.c (gfc_compare_union_types): Likewise. From-SVN: r242057
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c182
1 files changed, 91 insertions, 91 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 0120ceb..1272f1f 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -8597,31 +8597,31 @@ get_struct_decl (const char *name, sym_flavor fl, locus *decl,
match
gfc_match_map (void)
{
- /* Counter used to give unique internal names to map structures. */
- static unsigned int gfc_map_id = 0;
- char name[GFC_MAX_SYMBOL_LEN + 1];
- gfc_symbol *sym;
- locus old_loc;
+ /* Counter used to give unique internal names to map structures. */
+ static unsigned int gfc_map_id = 0;
+ char name[GFC_MAX_SYMBOL_LEN + 1];
+ gfc_symbol *sym;
+ locus old_loc;
- old_loc = gfc_current_locus;
+ old_loc = gfc_current_locus;
- if (gfc_match_eos () != MATCH_YES)
- {
- gfc_error ("Junk after MAP statement at %C");
- gfc_current_locus = old_loc;
- return MATCH_ERROR;
- }
+ if (gfc_match_eos () != MATCH_YES)
+ {
+ gfc_error ("Junk after MAP statement at %C");
+ gfc_current_locus = old_loc;
+ return MATCH_ERROR;
+ }
- /* Map blocks are anonymous so we make up unique names for the symbol table
- which are invalid Fortran identifiers. */
- snprintf (name, GFC_MAX_SYMBOL_LEN + 1, "MM$%u", gfc_map_id++);
+ /* Map blocks are anonymous so we make up unique names for the symbol table
+ which are invalid Fortran identifiers. */
+ snprintf (name, GFC_MAX_SYMBOL_LEN + 1, "MM$%u", gfc_map_id++);
- if (!get_struct_decl (name, FL_STRUCT, &old_loc, &sym))
- return MATCH_ERROR;
+ if (!get_struct_decl (name, FL_STRUCT, &old_loc, &sym))
+ return MATCH_ERROR;
- gfc_new_block = sym;
+ gfc_new_block = sym;
- return MATCH_YES;
+ return MATCH_YES;
}
@@ -8630,31 +8630,31 @@ gfc_match_map (void)
match
gfc_match_union (void)
{
- /* Counter used to give unique internal names to union types. */
- static unsigned int gfc_union_id = 0;
- char name[GFC_MAX_SYMBOL_LEN + 1];
- gfc_symbol *sym;
- locus old_loc;
+ /* Counter used to give unique internal names to union types. */
+ static unsigned int gfc_union_id = 0;
+ char name[GFC_MAX_SYMBOL_LEN + 1];
+ gfc_symbol *sym;
+ locus old_loc;
- old_loc = gfc_current_locus;
+ old_loc = gfc_current_locus;
- if (gfc_match_eos () != MATCH_YES)
- {
- gfc_error ("Junk after UNION statement at %C");
- gfc_current_locus = old_loc;
- return MATCH_ERROR;
- }
+ if (gfc_match_eos () != MATCH_YES)
+ {
+ gfc_error ("Junk after UNION statement at %C");
+ gfc_current_locus = old_loc;
+ return MATCH_ERROR;
+ }
- /* Unions are anonymous so we make up unique names for the symbol table
- which are invalid Fortran identifiers. */
- snprintf (name, GFC_MAX_SYMBOL_LEN + 1, "UU$%u", gfc_union_id++);
+ /* Unions are anonymous so we make up unique names for the symbol table
+ which are invalid Fortran identifiers. */
+ snprintf (name, GFC_MAX_SYMBOL_LEN + 1, "UU$%u", gfc_union_id++);
- if (!get_struct_decl (name, FL_UNION, &old_loc, &sym))
- return MATCH_ERROR;
+ if (!get_struct_decl (name, FL_UNION, &old_loc, &sym))
+ return MATCH_ERROR;
- gfc_new_block = sym;
+ gfc_new_block = sym;
- return MATCH_YES;
+ return MATCH_YES;
}
@@ -8666,67 +8666,67 @@ gfc_match_union (void)
match
gfc_match_structure_decl (void)
{
- /* Counter used to give unique internal names to anonymous structures. */
- static unsigned int gfc_structure_id = 0;
- char name[GFC_MAX_SYMBOL_LEN + 1];
- gfc_symbol *sym;
- match m;
- locus where;
+ /* Counter used to give unique internal names to anonymous structures. */
+ static unsigned int gfc_structure_id = 0;
+ char name[GFC_MAX_SYMBOL_LEN + 1];
+ gfc_symbol *sym;
+ match m;
+ locus where;
- if(!flag_dec_structure)
- {
- gfc_error ("STRUCTURE at %C is a DEC extension, enable with "
- "-fdec-structure");
- return MATCH_ERROR;
- }
+ if (!flag_dec_structure)
+ {
+ gfc_error ("STRUCTURE at %C is a DEC extension, enable with "
+ "-fdec-structure");
+ return MATCH_ERROR;
+ }
- name[0] = '\0';
+ name[0] = '\0';
- m = gfc_match (" /%n/", name);
- if (m != MATCH_YES)
- {
- /* Non-nested structure declarations require a structure name. */
- if (!gfc_comp_struct (gfc_current_state ()))
- {
- gfc_error ("Structure name expected in non-nested structure "
- "declaration at %C");
- return MATCH_ERROR;
- }
- /* This is an anonymous structure; make up a unique name for it
- (upper-case letters never make it to symbol names from the source).
- The important thing is initializing the type variable
- and setting gfc_new_symbol, which is immediately used by
- parse_structure () and variable_decl () to add components of
- this type. */
- snprintf (name, GFC_MAX_SYMBOL_LEN + 1, "SS$%u", gfc_structure_id++);
- }
+ m = gfc_match (" /%n/", name);
+ if (m != MATCH_YES)
+ {
+ /* Non-nested structure declarations require a structure name. */
+ if (!gfc_comp_struct (gfc_current_state ()))
+ {
+ gfc_error ("Structure name expected in non-nested structure "
+ "declaration at %C");
+ return MATCH_ERROR;
+ }
+ /* This is an anonymous structure; make up a unique name for it
+ (upper-case letters never make it to symbol names from the source).
+ The important thing is initializing the type variable
+ and setting gfc_new_symbol, which is immediately used by
+ parse_structure () and variable_decl () to add components of
+ this type. */
+ snprintf (name, GFC_MAX_SYMBOL_LEN + 1, "SS$%u", gfc_structure_id++);
+ }
- where = gfc_current_locus;
- /* No field list allowed after non-nested structure declaration. */
- if (!gfc_comp_struct (gfc_current_state ())
- && gfc_match_eos () != MATCH_YES)
- {
- gfc_error ("Junk after non-nested STRUCTURE statement at %C");
- return MATCH_ERROR;
- }
+ where = gfc_current_locus;
+ /* No field list allowed after non-nested structure declaration. */
+ if (!gfc_comp_struct (gfc_current_state ())
+ && gfc_match_eos () != MATCH_YES)
+ {
+ gfc_error ("Junk after non-nested STRUCTURE statement at %C");
+ return MATCH_ERROR;
+ }
- /* Make sure the name is not the name of an intrinsic type. */
- if (gfc_is_intrinsic_typename (name))
- {
- gfc_error ("Structure name '%s' at %C cannot be the same as an"
- " intrinsic type", name);
- return MATCH_ERROR;
- }
+ /* Make sure the name is not the name of an intrinsic type. */
+ if (gfc_is_intrinsic_typename (name))
+ {
+ gfc_error ("Structure name '%s' at %C cannot be the same as an"
+ " intrinsic type", name);
+ return MATCH_ERROR;
+ }
- /* Store the actual type symbol for the structure with an upper-case first
- letter (an invalid Fortran identifier). */
+ /* Store the actual type symbol for the structure with an upper-case first
+ letter (an invalid Fortran identifier). */
- sprintf (name, gfc_dt_upper_string (name));
- if (!get_struct_decl (name, FL_STRUCT, &where, &sym))
- return MATCH_ERROR;
+ sprintf (name, gfc_dt_upper_string (name));
+ if (!get_struct_decl (name, FL_STRUCT, &where, &sym))
+ return MATCH_ERROR;
- gfc_new_block = sym;
- return MATCH_YES;
+ gfc_new_block = sym;
+ return MATCH_YES;
}