summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-05-12 16:25:56 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-05-12 16:32:52 +0200
commite7e361f6097f5e575ba9ec84e57b938bccfabdb7 (patch)
tree0439c3d88f1f464cc569c538cde942345e08070a /src
parenta622bb95bffa94fdfefac74a3e18cbaee136b6cb (diff)
Fix indentation
Diffstat (limited to 'src')
-rw-r--r--src/ast/ast.c18
-rw-r--r--src/ast/attribute.c23
-rw-r--r--src/ast/constfold.c2
-rw-r--r--src/ast/type.c8
-rw-r--r--src/ast/walk.c2
-rw-r--r--src/driver/c_driver.c8
-rw-r--r--src/firm/ast2firm.c44
-rw-r--r--src/firm/firm_opt.c8
-rw-r--r--src/parser/builtins.c6
-rw-r--r--src/parser/format_check.c10
-rw-r--r--src/parser/input.c8
-rw-r--r--src/parser/parser.c36
-rw-r--r--src/parser/preprocessor.c6
-rw-r--r--src/wrappergen/write_jna.c2
14 files changed, 90 insertions, 91 deletions
diff --git a/src/ast/ast.c b/src/ast/ast.c
index 8b3556b..cad65fd 100644
--- a/src/ast/ast.c
+++ b/src/ast/ast.c
@@ -1178,13 +1178,13 @@ static void print_ms_modifiers(const declaration_t *declaration)
if (declaration->base.kind == ENTITY_VARIABLE) {
variable_t *variable = (variable_t*)declaration;
if (variable->alignment != 0
- || variable->get_property_sym != NULL
- || variable->put_property_sym != NULL) {
+ || variable->get_property_sym != NULL
+ || variable->put_property_sym != NULL) {
if (variable->alignment != 0) {
print_format("%salign(%u)", sep_next(&sep), variable->alignment);
}
if (variable->get_property_sym != NULL
- || variable->put_property_sym != NULL) {
+ || variable->put_property_sym != NULL) {
char *comma = "";
print_format("%sproperty(", sep_next(&sep));
if (variable->get_property_sym != NULL) {
@@ -1299,7 +1299,7 @@ static void print_declaration(entity_t const *const entity)
switch (entity->kind) {
case ENTITY_FUNCTION:
print_type_ext(entity->declaration.type, entity->base.symbol,
- &entity->function.parameters);
+ &entity->function.parameters);
if (entity->function.body != NULL) {
print_char('\n');
@@ -1411,7 +1411,7 @@ void print_ast(const translation_unit_t *unit)
if (entity->kind == ENTITY_ENUM_VALUE)
continue;
if (entity->base.namespc != NAMESPACE_NORMAL
- && entity->base.symbol == NULL)
+ && entity->base.symbol == NULL)
continue;
if (is_generated_entity(entity))
continue;
@@ -1546,10 +1546,10 @@ expression_classification_t is_linker_constant(const expression_t *expression)
/* FALLTHROUGH */
case EXPR_UNARY_CAST: {
type_t *dest = skip_typeref(expression->base.type);
- if (!is_type_pointer(dest) && (
- dest->kind != TYPE_ATOMIC ||
- !(get_atomic_type_flags(dest->atomic.akind) & ATOMIC_TYPE_FLAG_INTEGER) ||
- get_atomic_type_size(dest->atomic.akind) < get_ctype_size(type_void_ptr)
+ if (!is_type_pointer(dest) &&
+ (dest->kind != TYPE_ATOMIC ||
+ !(get_atomic_type_flags(dest->atomic.akind) & ATOMIC_TYPE_FLAG_INTEGER) ||
+ get_atomic_type_size(dest->atomic.akind) < get_ctype_size(type_void_ptr)
))
return is_constant_expression(expression);
diff --git a/src/ast/attribute.c b/src/ast/attribute.c
index 86e63cd..58f29ac 100644
--- a/src/ast/attribute.c
+++ b/src/ast/attribute.c
@@ -169,7 +169,7 @@ static void handle_attribute_aligned(const attribute_t *attribute,
entity_t *entity)
{
int alignment = 32; /* TODO: fill in maximum useful alignment for
- target machine */
+ target machine */
if (attribute->a.arguments) {
attribute_argument_t *argument = attribute->a.arguments;
alignment = fold_expression_to_int(argument->v.expression);
@@ -329,7 +329,7 @@ static void handle_attribute_alias(const attribute_t *attribute,
if (decl->storage_class == STORAGE_CLASS_EXTERN) {
/* code generator will ignore the extern declaration */
warningf(WARN_OTHER, &entity->base.pos,
- "extern storage class ignored for alias %N", entity);
+ "extern storage class ignored for alias %N", entity);
}
ARR_APP1(entity_t*, alias_entities, entity);
@@ -356,8 +356,7 @@ void handle_entity_attributes(const attribute_t *attributes, entity_t *entity)
case ATTRIBUTE_GNU_CONSTRUCTOR: modifiers |= DM_CONSTRUCTOR; break;
case ATTRIBUTE_GNU_DESTRUCTOR: modifiers |= DM_DESTRUCTOR; break;
case ATTRIBUTE_GNU_TRANSPARENT_UNION:
- modifiers |= DM_TRANSPARENT_UNION;
- break;
+ modifiers |= DM_TRANSPARENT_UNION; break;
case ATTRIBUTE_GNU_USED: modifiers |= DM_USED; break;
case ATTRIBUTE_GNU_UNUSED: modifiers |= DM_UNUSED; break;
case ATTRIBUTE_GNU_DLLIMPORT: modifiers |= DM_DLLIMPORT; break;
@@ -367,14 +366,14 @@ void handle_entity_attributes(const attribute_t *attributes, entity_t *entity)
case ATTRIBUTE_GNU_LEAF: modifiers |= DM_LEAF; break;
case ATTRIBUTE_GNU_GNU_INLINE: modifiers |= DM_GNU_INLINE; break;
- case ATTRIBUTE_MS_DLLIMPORT: modifiers |= DM_DLLIMPORT; break;
- case ATTRIBUTE_MS_DLLEXPORT: modifiers |= DM_DLLEXPORT; break;
- case ATTRIBUTE_MS_NAKED: modifiers |= DM_NAKED; break;
- case ATTRIBUTE_MS_NOINLINE: modifiers |= DM_NOINLINE; break;
- case ATTRIBUTE_MS_THREAD: modifiers |= DM_THREAD; break;
- case ATTRIBUTE_MS_DEPRECATED: modifiers |= DM_DEPRECATED; break;
- case ATTRIBUTE_MS_RESTRICT: modifiers |= DM_RESTRICT; break;
- case ATTRIBUTE_MS_NOALIAS: modifiers |= DM_NOALIAS; break;
+ case ATTRIBUTE_MS_DLLIMPORT: modifiers |= DM_DLLIMPORT; break;
+ case ATTRIBUTE_MS_DLLEXPORT: modifiers |= DM_DLLEXPORT; break;
+ case ATTRIBUTE_MS_NAKED: modifiers |= DM_NAKED; break;
+ case ATTRIBUTE_MS_NOINLINE: modifiers |= DM_NOINLINE; break;
+ case ATTRIBUTE_MS_THREAD: modifiers |= DM_THREAD; break;
+ case ATTRIBUTE_MS_DEPRECATED: modifiers |= DM_DEPRECATED; break;
+ case ATTRIBUTE_MS_RESTRICT: modifiers |= DM_RESTRICT; break;
+ case ATTRIBUTE_MS_NOALIAS: modifiers |= DM_NOALIAS; break;
case ATTRIBUTE_GNU_ALIAS:
handle_attribute_alias(attribute, entity);
diff --git a/src/ast/constfold.c b/src/ast/constfold.c
index 1a5b59e..04db5c5 100644
--- a/src/ast/constfold.c
+++ b/src/ast/constfold.c
@@ -887,7 +887,7 @@ static complex_constant fold_complex_conditional(
if (!is_type_complex(condition_type)) {
bool condval = fold_expression_to_bool(cond->condition);
expression_t *to_fold = condval ? cond->true_expression
- : cond->false_expression;
+ : cond->false_expression;
return fold_complex(to_fold);
}
complex_constant const val = fold_complex(cond->condition);
diff --git a/src/ast/type.c b/src/ast/type.c
index 284c3ac..d97b2f1 100644
--- a/src/ast/type.c
+++ b/src/ast/type.c
@@ -925,7 +925,7 @@ check_promoted_types:
function_parameter_t *parameter1 = func1->parameters;
function_parameter_t *parameter2 = func2->parameters;
for ( ; parameter1 != NULL && parameter2 != NULL;
- parameter1 = parameter1->next, parameter2 = parameter2->next) {
+ parameter1 = parameter1->next, parameter2 = parameter2->next) {
type_t *parameter1_type = skip_typeref(parameter1->type);
type_t *parameter2_type = skip_typeref(parameter2->type);
@@ -970,9 +970,9 @@ bool types_compatible_ignore_qualifiers(const type_t *type1,
if (type1->kind != type2->kind) {
/* enum types are compatible to their base integer type */
if ((type1->kind == TYPE_ENUM
- && is_type_atomic(type2, type1->enumt.base.akind))
- || (type2->kind == TYPE_ENUM
- && is_type_atomic(type1, type2->enumt.base.akind)))
+ && is_type_atomic(type2, type1->enumt.base.akind))
+ || (type2->kind == TYPE_ENUM
+ && is_type_atomic(type1, type2->enumt.base.akind)))
return true;
/* error types are compatible to everything to avoid follow-up errors */
if (!is_type_valid(type1) || !is_type_valid(type2))
diff --git a/src/ast/walk.c b/src/ast/walk.c
index de2afc4..ff16d6e 100644
--- a/src/ast/walk.c
+++ b/src/ast/walk.c
@@ -345,7 +345,7 @@ static void walk_statement(statement_t *const stmt, const walk_env_t *const env)
case STATEMENT_DECLARATION:
walk_declarations(stmt->declaration.declarations_begin,
- stmt->declaration.declarations_end, env);
+ stmt->declaration.declarations_end, env);
return;
case STATEMENT_COMPUTED_GOTO:
diff --git a/src/driver/c_driver.c b/src/driver/c_driver.c
index a5de88b..4b40b9c 100644
--- a/src/driver/c_driver.c
+++ b/src/driver/c_driver.c
@@ -174,7 +174,7 @@ static void init_external_preprocessor(void)
driver_add_flag(o, "-D__CPARSER_MAJOR__=\"%s\"", CPARSER_MAJOR);
driver_add_flag(o, "-D__CPARSER_MINOR__=\"%s\"", CPARSER_MINOR);
driver_add_flag(o, "-D__CPARSER_PATCHLEVEL__=\"%s\"",
- CPARSER_PATCHLEVEL);
+ CPARSER_PATCHLEVEL);
driver_add_flag(o, "-U_FORTIFY_SOURCE");
driver_add_flag(o, "-D_FORTIFY_SOURCE=0");
@@ -237,7 +237,7 @@ static void init_c_dialect(bool const is_cpp, compilation_unit_t const *const un
if (!is_cpp) {
switch (standard) {
case STANDARD_C89: features = _C89; break;
- /* TODO determine difference between these two */
+ /* TODO determine difference between these two */
case STANDARD_C89AMD1: features = _C89; break;
case STANDARD_C99: features = _C89 | _C99; break;
case STANDARD_C11: features = _C89 | _C99 | _C11; break;
@@ -509,7 +509,7 @@ static void append_standard_include_paths(void)
#ifdef APPEND_MULTILIB_DIRS
assert(obstack_object_size(&file_obst) == 0);
const char *triple = multilib_directory_target_triple != NULL
- ? multilib_directory_target_triple : target.triple;
+ ? multilib_directory_target_triple : target.triple;
if (triple != NULL) {
obstack_printf(&file_obst, "%s/%s", local_include_dir, triple);
char *const path = obstack_nul_finish(&file_obst);
@@ -765,7 +765,7 @@ bool build_firm_ir(compilation_env_t *env, compilation_unit_t *unit)
timer_stop(t_construct);
if (stat_ev_enabled) {
stat_ev_dbl("time_graph_construction",
- ir_timer_elapsed_sec(t_construct));
+ ir_timer_elapsed_sec(t_construct));
stat_ev_int("size_graph_construction", count_firm_nodes());
}
unit->type = COMPILATION_UNIT_INTERMEDIATE_REPRESENTATION;
diff --git a/src/firm/ast2firm.c b/src/firm/ast2firm.c
index e978657..fd61080 100644
--- a/src/firm/ast2firm.c
+++ b/src/firm/ast2firm.c
@@ -233,7 +233,7 @@ static type_t *get_parameter_type(type_t *orig_type)
{
type_t *type = skip_typeref(orig_type);
if (is_type_union(type)
- && get_type_modifiers(orig_type) & DM_TRANSPARENT_UNION) {
+ && get_type_modifiers(orig_type) & DM_TRANSPARENT_UNION) {
compound_t *compound = type->compound.compound;
type = compound->members.first_entity->declaration.type;
}
@@ -1459,7 +1459,7 @@ static ir_node *get_value_from_lvalue(const expression_t *expression,
entity_t *entity = ref->entity;
assert(entity->kind == ENTITY_VARIABLE
- || entity->kind == ENTITY_PARAMETER);
+ || entity->kind == ENTITY_PARAMETER);
assert(entity->declaration.kind != DECLARATION_KIND_UNKNOWN);
int value_number;
if (entity->declaration.kind == DECLARATION_KIND_LOCAL_VARIABLE ||
@@ -1767,7 +1767,7 @@ static ir_node *create_op(binary_expression_t const *const expr, ir_node *left,
ir_node *const sub = new_d_Sub(dbgi, left, right, mode);
ir_node *const no_mem = new_NoMem();
ir_node *const divn = new_d_DivRL(dbgi, no_mem, sub, conv_size,
- mode, op_pin_state_floats);
+ mode, op_pin_state_floats);
return new_d_Proj(dbgi, divn, mode, pn_Div_res);
}
/* fallthrough */
@@ -1962,8 +1962,8 @@ static ir_node *array_access_to_firm(
{
dbg_info *dbgi = get_dbg_info(&expression->base.pos);
ir_node *addr = array_access_addr(expression);
- type_t *type = revert_automatic_type_conversion(
- (const expression_t*) expression);
+ type_t *type = revert_automatic_type_conversion((const expression_t*)
+ expression);
type = skip_typeref(type);
return deref_address(dbgi, type, addr);
@@ -1987,11 +1987,11 @@ static ir_entity *create_initializer_entity(dbg_info *dbgi,
type_t *const skipped = skip_typeref(type);
ir_type *const irtype = get_ir_type(type);
ir_type *const global_type = get_glob_type();
- ir_linkage linkage = (skipped->base.qualifiers & TYPE_QUALIFIER_CONST)
- ? IR_LINKAGE_CONSTANT : IR_LINKAGE_DEFAULT;
+ ir_linkage linkage = (skipped->base.qualifiers & TYPE_QUALIFIER_CONST)
+ ? IR_LINKAGE_CONSTANT : IR_LINKAGE_DEFAULT;
ir_entity *const entity = new_global_entity(global_type, id, irtype,
- ir_visibility_private,
- linkage);
+ ir_visibility_private,
+ linkage);
set_entity_dbg_info(entity, dbgi);
set_entity_initializer(entity, irinitializer);
@@ -2072,7 +2072,7 @@ static ir_node *sizeof_to_firm(const typeprop_expression_t *expression)
type_t *const type = skip_typeref(expression->type);
/* ยง6.5.3.4:2 if the type is a VLA, evaluate the expression. */
if (is_type_array(type) && type->array.is_vla
- && expression->tp_expression != NULL) {
+ && expression->tp_expression != NULL) {
expression_to_value(expression->tp_expression);
}
@@ -2156,8 +2156,8 @@ static ir_node *select_to_firm(const select_expression_t *expression)
{
dbg_info *dbgi = get_dbg_info(&expression->base.pos);
ir_node *addr = select_addr(expression);
- type_t *type = revert_automatic_type_conversion(
- (const expression_t*) expression);
+ type_t *type = revert_automatic_type_conversion((const expression_t*)
+ expression);
type = skip_typeref(type);
entity_t *entry = expression->compound_entry;
@@ -3455,7 +3455,7 @@ static void walk_designator(type_path_t *path, const designator_t *designator)
if (type->kind == TYPE_COMPOUND_UNION) {
ir_initializer_t *initializer = top->initializer;
if (initializer != NULL
- && get_initializer_kind(initializer) == IR_INITIALIZER_COMPOUND) {
+ && get_initializer_kind(initializer) == IR_INITIALIZER_COMPOUND) {
/* are we writing to a new element? */
ir_initializer_t *oldi
= get_initializer_compound_value(initializer, index_int);
@@ -3927,7 +3927,7 @@ static void create_variable_initializer(entity_t *entity)
assert(declaration_kind == DECLARATION_KIND_GLOBAL_VARIABLE);
ir_entity *irentity = entity->variable.v.entity;
if (tq & TYPE_QUALIFIER_CONST
- && get_entity_owner(irentity) != get_tls_type()) {
+ && get_entity_owner(irentity) != get_tls_type()) {
add_entity_linkage(irentity, IR_LINKAGE_CONSTANT);
}
ir_initializer_t *complex_init = create_initializer_compound(2);
@@ -3958,7 +3958,7 @@ static void create_variable_initializer(entity_t *entity)
ir_entity *irentity = entity->variable.v.entity;
if (tq & TYPE_QUALIFIER_CONST
- && get_entity_owner(irentity) != get_tls_type()) {
+ && get_entity_owner(irentity) != get_tls_type()) {
add_entity_linkage(irentity, IR_LINKAGE_CONSTANT);
}
set_atomic_ent_value(irentity, node);
@@ -4679,7 +4679,7 @@ static ir_node *asm_statement_to_firm(const asm_statement_t *statement)
}
}
assert(obstack_object_size(&asm_obst)
- == out_size * sizeof(ir_asm_constraint));
+ == out_size * sizeof(ir_asm_constraint));
ir_asm_constraint *output_constraints = obstack_finish(&asm_obst);
obstack_grow(&asm_obst, tmp_in_constraints,
@@ -4708,7 +4708,7 @@ static ir_node *asm_statement_to_firm(const asm_statement_t *statement)
ir_node *mem = needs_memory ? get_store() : new_NoMem();
assert(obstack_object_size(&asm_obst)
- == in_size * sizeof(ir_asm_constraint));
+ == in_size * sizeof(ir_asm_constraint));
ir_asm_constraint *input_constraints = obstack_finish(&asm_obst);
/* create asm node */
@@ -4806,7 +4806,7 @@ static void count_local_variables_in_stmt(statement_t *stmt, void *const env)
case STATEMENT_DECLARATION: {
const declaration_statement_t *const decl_stmt = &stmt->declaration;
*count += count_local_variables(decl_stmt->declarations_begin,
- decl_stmt->declarations_end);
+ decl_stmt->declarations_end);
break;
}
@@ -4874,9 +4874,9 @@ static void initialize_function_parameters(function_t *const function)
parameter->declaration.kind = DECLARATION_KIND_PARAMETER;
parameter->variable.v.value_number = next_value_number_function;
set_irg_loc_description(irg, next_value_number_function,
- parameter);
+ parameter);
set_irg_loc_description(irg, next_value_number_function+1,
- parameter);
+ parameter);
set_value(next_value_number_function, value.real);
set_value(next_value_number_function+1, value.imag);
next_value_number_function += 2;
@@ -4888,7 +4888,7 @@ static void initialize_function_parameters(function_t *const function)
parameter->declaration.kind = DECLARATION_KIND_PARAMETER;
parameter->variable.v.value_number = next_value_number_function;
set_irg_loc_description(irg, next_value_number_function,
- parameter);
+ parameter);
++next_value_number_function;
set_value(parameter->variable.v.value_number, value);
@@ -5097,7 +5097,7 @@ static void scope_to_firm(scope_t *scope)
}
case ENTITY_VARIABLE: {
assert(entity->declaration.kind
- == DECLARATION_KIND_GLOBAL_VARIABLE);
+ == DECLARATION_KIND_GLOBAL_VARIABLE);
entity_t *alias = entity->variable.alias.entity;
if (alias != NULL) {
ir_entity *aliased = get_irentity(alias);
diff --git a/src/firm/firm_opt.c b/src/firm/firm_opt.c
index f15bb44..8b2a54a 100644
--- a/src/firm/firm_opt.c
+++ b/src/firm/firm_opt.c
@@ -637,9 +637,9 @@ static void do_firm_lowering(void)
{
/* enable architecture dependent optimizations */
arch_dep_set_opts((arch_dep_opts_t)
- ((firm_opt.muls ? arch_dep_mul_to_shift : arch_dep_none) |
- (firm_opt.divs ? arch_dep_div_by_const : arch_dep_none) |
- (firm_opt.mods ? arch_dep_mod_by_const : arch_dep_none) ));
+ ((firm_opt.muls ? arch_dep_mul_to_shift : arch_dep_none) |
+ (firm_opt.divs ? arch_dep_div_by_const : arch_dep_none) |
+ (firm_opt.mods ? arch_dep_mod_by_const : arch_dep_none) ));
for (size_t i = get_irp_n_irgs(); i-- > 0; ) {
ir_graph *irg = get_irp_irg(i);
do_irg_opt(irg, "reassociation");
@@ -733,7 +733,7 @@ void optimize_lower_ir_prog(void)
firm_dump.ir_graph = (bool) (firm_dump.ir_graph | firm_dump.all_phases);
ir_add_dump_flags(ir_dump_flag_keepalive_edges
- | ir_dump_flag_consts_local | ir_dump_flag_dominance);
+ | ir_dump_flag_consts_local | ir_dump_flag_dominance);
ir_remove_dump_flags(ir_dump_flag_loops | ir_dump_flag_ld_names);
/* FIXME: cloning might ADD new graphs. */
diff --git a/src/parser/builtins.c b/src/parser/builtins.c
index 10e9463..2558836 100644
--- a/src/parser/builtins.c
+++ b/src/parser/builtins.c
@@ -191,7 +191,7 @@ static void merge_builtin(entity_t *def, builtin_kind_t kind, type_t *type)
{
if (def->kind != ENTITY_FUNCTION) {
warningf(WARN_OTHER, &def->base.pos,
- "language standard mandates that %N is a function", def);
+ "language standard mandates that %N is a function", def);
return;
} else {
/* check if the type is compatible with the libc specified one */
@@ -199,8 +199,8 @@ static void merge_builtin(entity_t *def, builtin_kind_t kind, type_t *type)
type_t *def_skipped = skip_typeref(def_type);
if (!types_compatible(def_skipped, type)) {
warningf(WARN_OTHER, &def->base.pos,
- "declaration of %N with type '%T' is incompatible with language standard specified '%T'",
- def, def_type, type);
+ "declaration of %N with type '%T' is incompatible with language standard specified '%T'",
+ def, def_type, type);
return;
}
}
diff --git a/src/parser/format_check.c b/src/parser/format_check.c
index 9eae76a..4b891ce 100644
--- a/src/parser/format_check.c
+++ b/src/parser/format_check.c
@@ -160,7 +160,7 @@ static void check_argument_type(format_env_t *const env, type_t *const spec_type
type_t *const arg_to = skip_typeref(arg_skip->pointer.points_to);
/* Allow any pointer type, if void* is expected. */
if ((arg_to->base.qualifiers & ~spec_to->base.qualifiers) == 0 &&
- (types_compatible_ignore_qualifiers(arg_to, spec_to) || is_type_void(spec_to)))
+ (types_compatible_ignore_qualifiers(arg_to, spec_to) || is_type_void(spec_to)))
return;
}
} else if (types_compatible_ignore_qualifiers(arg_skip, spec_skip)) {
@@ -562,8 +562,8 @@ check_c_width:
if (!suppress_assignment && env->arg) {
type_t *const type = skip_typeref(revert_automatic_type_conversion(env->arg->expression));
if (is_type_array(type) &&
- type->array.size_constant &&
- width > type->array.size) {
+ type->array.size_constant &&
+ width > type->array.size) {
warningf(WARN_FORMAT, env->pos, "target buffer '%T' is too small for %u characters at format %u", type, width, env->num_fmt);
}
}
@@ -588,8 +588,8 @@ check_c_width:
if (!suppress_assignment && width != 0 && env->arg) {
type_t *const type = skip_typeref(revert_automatic_type_conversion(env->arg->expression));
if (is_type_array(type) &&
- type->array.size_constant &&
- width >= type->array.size) {
+ type->array.size_constant &&
+ width >= type->array.size) {
warningf(WARN_FORMAT, env->pos, "target buffer '%T' is too small for %u characters and \\0 at format %u", type, width, env->num_fmt);
}
}
diff --git a/src/parser/input.c b/src/parser/input.c
index 1fa835e..6f8ab08 100644
--- a/src/parser/input.c
+++ b/src/parser/input.c
@@ -183,10 +183,10 @@ one_more:
goto invalid_char;
}
if (decoded < min_code ||
- decoded > 0x10FFFF ||
- (0xD800 <= decoded && decoded < 0xE000) || // high/low surrogates
- (0xFDD0 <= decoded && decoded < 0xFDF0) || // noncharacters
- (decoded & 0xFFFE) == 0xFFFE) { // noncharacters
+ decoded > 0x10FFFF ||
+ (0xD800 <= decoded && decoded < 0xE000) || // high/low surrogates
+ (0xFDD0 <= decoded && decoded < 0xFDF0) || // noncharacters
+ (decoded & 0xFFFE) == 0xFFFE) { // noncharacters
report_invalid_sequence(buffer, dst);
decoded = UNICODE_REPLACEMENT_CHARACTER;
}
diff --git a/src/parser/parser.c b/src/parser/parser.c
index 2f6343b..28b15c5 100644
--- a/src/parser/parser.c
+++ b/src/parser/parser.c
@@ -920,8 +920,8 @@ static void warn_enum_conversion(type_t *dest_type, expression_t *expression)
const enum_t *const dest_enum = skipped_dest->enumt.enume;
if (expression_enum != dest_enum) {
warningf(WARN_ENUM_CONVERSION, &expression->base.pos,
- "implicit conversion from %N to different enumeration type '%T'",
- expression_enum, dest_type);
+ "implicit conversion from %N to different enumeration type '%T'",
+ expression_enum, dest_type);
}
}
@@ -3045,7 +3045,7 @@ static entity_t *parse_parameter(void)
parse_declaration_specifiers(&specifiers);
entity_t *entity = parse_declarator(&specifiers,
- DECL_MAY_BE_ABSTRACT | DECL_IS_PARAMETER);
+ DECL_MAY_BE_ABSTRACT | DECL_IS_PARAMETER);
anonymous_entity = NULL;
return entity;
}
@@ -3125,7 +3125,7 @@ static void parse_parameters(function_type_t *type, scope_t *scope)
entity_t *entity = parse_parameter();
if (entity->kind == ENTITY_TYPEDEF) {
errorf(&entity->base.pos,
- "typedef not allowed as function parameter");
+ "typedef not allowed as function parameter");
break;
}
assert(is_declaration(entity));
@@ -3475,7 +3475,7 @@ static type_t *construct_declarator_type(construct_type_t *construct_list,
errorf(pos, "function returning array is not allowed");
} else if (skipped_return_type->base.qualifiers != 0) {
warningf(WARN_IGNORED_QUALIFIERS, pos,
- "type qualifiers in return type of function type are meaningless");
+ "type qualifiers in return type of function type are meaningless");
}
/* The function type was constructed earlier. Freeing it here will
@@ -3625,7 +3625,7 @@ static entity_t *parse_declarator(const declaration_specifiers_t *specifiers,
position_t const *const pos = env.symbol ? &env.pos : &specifiers->pos;
if (specifiers->storage_class == STORAGE_CLASS_TYPEDEF) {
entity = allocate_entity_zero(ENTITY_TYPEDEF, NAMESPACE_NORMAL,
- env.symbol, &env.pos);
+ env.symbol, &env.pos);
if (anonymous_entity != NULL) {
if (is_type_compound(type)) {
@@ -3643,7 +3643,7 @@ static entity_t *parse_declarator(const declaration_specifiers_t *specifiers,
}
} else if (flags & DECL_CREATE_COMPOUND_MEMBER) {
entity = allocate_entity_zero(ENTITY_COMPOUND_MEMBER,
- NAMESPACE_NORMAL, env.symbol, pos);
+ NAMESPACE_NORMAL, env.symbol, pos);
if (env.symbol != NULL) {
if (specifiers->is_inline && is_type_valid(type))
@@ -5265,7 +5265,7 @@ static void parse_external_declaration(void)
parameter->base.parent_scope = current_scope;
assert(parameter->base.parent_scope == NULL
- || parameter->base.parent_scope == current_scope);
+ || parameter->base.parent_scope == current_scope);
parameter->base.parent_scope = current_scope;
if (parameter->base.symbol == NULL) {
errorf(&parameter->base.pos, "parameter name omitted");
@@ -5304,8 +5304,8 @@ static void parse_external_declaration(void)
if (noreturn_candidate
&& !(function->base.modifiers & DM_NORETURN))
warningf(WARN_MISSING_NORETURN, &body->base.pos,
- "function '%#N' is candidate for attribute 'noreturn'",
- entity);
+ "function '%#N' is candidate for attribute 'noreturn'",
+ entity);
}
if (is_main(entity)) {
@@ -5475,7 +5475,7 @@ static void parse_bitfield_member(entity_t *entity)
/* hope that people don't invent crazy types with more bits
* than our struct can hold */
assert(size_long <
- (1 << sizeof(entity->compound_member.bit_size)*8));
+ (1 << sizeof(entity->compound_member.bit_size) * 8));
if (is_type_enum(skipped) && is_warn_on(WARN_BITFIELD_SIZE)) {
enum_t *enume = skipped->enumt.enume;
if (!enum_bitfield_big_enough(enume, skipped,
@@ -8344,7 +8344,7 @@ static void semantic_comparison(binary_expression_t *expression,
&& ((signed_left && maybe_negative(left))
|| (signed_right && maybe_negative(right))))
warningf(WARN_SIGN_COMPARE, pos,
- "comparison between signed and unsigned");
+ "comparison between signed and unsigned");
}
if (!is_relational && is_type_float(arithmetic_type))
@@ -8375,8 +8375,8 @@ static void semantic_comparison(binary_expression_t *expression,
if (is_relational || !is_null_pointer_constant(left)) {
int_ptr_warning:
warningf(WARN_OTHER, pos,
- "comparison between pointer and integer: '%T' and '%T'",
- orig_type_left, orig_type_right);
+ "comparison between pointer and integer: '%T' and '%T'",
+ orig_type_left, orig_type_right);
}
} else if (is_type_valid(type_left) && is_type_valid(type_right)) {
type_error_incompatible("invalid operands in comparison", pos,
@@ -8638,8 +8638,8 @@ static void semantic_binexpr_assign(binary_expression_t *expression)
&& are_positions_contiguous(&expression->base.pos,
&expression->right->base.pos))
warningf(WARN_NOT_COMPOUND_ASSIGN, &expression->base.pos,
- "use of unary operator that may be intended as compound assignment (%hs%E)",
- "=", expression->right);
+ "use of unary operator that may be intended as compound assignment (%hs%E)",
+ "=", expression->right);
expression_t *left = expression->left;
if (!is_valid_assignment_lhs(left))
@@ -9451,7 +9451,7 @@ static statement_t *parse_case_statement(void)
ir_tarval *val = fold_expression(end_range);
statement->case_label.last_case = val;
if (tarval_cmp(val, statement->case_label.first_case)
- == ir_relation_less) {
+ == ir_relation_less) {
statement->case_label.is_empty_range = true;
warningf(WARN_OTHER, pos, "empty range specified");
}
@@ -10855,7 +10855,7 @@ static void parse_external(void)
case T___extension__:
/* tokens below are for implicit int */
case '&': /* & x; -> int& x; (and error later, because C++ has no
- implicit int) */
+ implicit int) */
case '*': /* * x; -> int* x; */
case '(': /* (x); -> int (x); */
PUSH_EXTENSION();
diff --git a/src/parser/preprocessor.c b/src/parser/preprocessor.c
index d7d7bec..b2f2eb5 100644
--- a/src/parser/preprocessor.c
+++ b/src/parser/preprocessor.c
@@ -1396,7 +1396,7 @@ static bool concat_macro_parameters(const position_t *pos,
obstack_grow(&pp_obstack, token0, sizeof(*token0));
size_t len1 = def1->list_len;
obstack_grow(&pp_obstack, def1->token_list,
- len1*sizeof(def1->token_list[0]));
+ len1 * sizeof(def1->token_list[0]));
newdef->function_definition = def1->function_definition;
goto finish_newdef;
}
@@ -2962,7 +2962,7 @@ finish_argument_list:
} else {
if (!pp_token.base.space_before && pp_token.kind != T_NEWLINE) {
warningf(WARN_OTHER, &pp_token.base.pos,
- "missing whitespace after macro name");
+ "missing whitespace after macro name");
}
}
@@ -3030,7 +3030,7 @@ finish_argument_list:
if (old_definition != NULL) {
if (old_definition->standard_define) {
warningf(WARN_BUILTIN_MACRO_REDEFINED, &input.pos,
- "redefining builtin macro '%Y'", macro_symbol);
+ "redefining builtin macro '%Y'", macro_symbol);
} else if (!pp_definitions_equal(old_definition, new_definition)) {
if (warningf(WARN_OTHER, &new_definition->pos, "multiple definitions of macro '%Y'", macro_symbol))
notef(&old_definition->pos, "macro '%Y' first defined here", macro_symbol);
diff --git a/src/wrappergen/write_jna.c b/src/wrappergen/write_jna.c
index e55f7cf..1b287f7 100644
--- a/src/wrappergen/write_jna.c
+++ b/src/wrappergen/write_jna.c
@@ -336,7 +336,7 @@ static void write_enum(const symbol_t *symbol, const enum_t *entity)
}
fprintf(out, ")");
if (entry->base.next != NULL
- && entry->base.next->kind == ENTITY_ENUM_VALUE) {
+ && entry->base.next->kind == ENTITY_ENUM_VALUE) {
fputs(",\n", out);
} else {
fputs(";\n", out);