[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[COMMITTED 2/2] cleanup: Satisfy make syntax-check
From: |
Darshit Shah |
Subject: |
[COMMITTED 2/2] cleanup: Satisfy make syntax-check |
Date: |
Thu, 16 Jan 2020 01:48:33 +0100 |
---
ChangeLog | 2 +-
cfg.mk | 3 ++-
src/ios.c | 2 +-
src/pkl-ast.c | 2 +-
src/pkl-fold.c | 6 +++---
src/pkl-gen.c | 2 +-
src/pkl-lex.l | 2 +-
src/pkl-promo.c | 10 +++++-----
src/pkl-typify.c | 6 +++---
src/pvm.jitter | 4 ++--
testsuite/poke.pkl/cast-offsets-diag-2.pk | 1 -
testsuite/poke.pkl/cast-void-diag-1.pk | 1 -
testsuite/poke.pkl/trim-diag-5.pk | 1 -
13 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f83ac276..a982d56e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -552,7 +552,7 @@
* pkl-asm.pks (remap, write, addo, subo, mulo, divo, modo, atrim)
(cdivo, ais, bconc): Simplify and optimize using new instructions.
* src/pkl-gen.pks (struct_field_mapper): Likewise.
-
+
2019-12-01 John Darrington <address@hidden>
* src/pk_dump.pk (dump): New parameter cluster_by
diff --git a/cfg.mk b/cfg.mk
index 3112eab9..3e28dacc 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -4,4 +4,5 @@ po_file=does-not-exist
export _gl_TS_headers = *.h
local-checks-to-skip = \
- sc_tight_scope
+ sc_tight_scope \
+ sc_prohibit_gnu_make_extensions
diff --git a/src/ios.c b/src/ios.c
index e7b399cd..a274e544 100644
--- a/src/ios.c
+++ b/src/ios.c
@@ -1477,7 +1477,7 @@ ios_write_string (ios io, ios_off offset, int flags,
const char *value)
{
const char *p;
-
+
if (io->dev_if->seek (io->dev, offset / 8, IOD_SEEK_SET)
== -1)
return IOS_EIOFF;
diff --git a/src/pkl-ast.c b/src/pkl-ast.c
index 420eae0e..5f775fd1 100644
--- a/src/pkl-ast.c
+++ b/src/pkl-ast.c
@@ -818,7 +818,7 @@ pkl_ast_sizeof_type (pkl_ast ast, pkl_ast_node type)
/* Struct fields with labels are not expected, as these
cannot appear in complete struct types. */
assert (PKL_AST_STRUCT_TYPE_FIELD_LABEL (t) == NULL);
-
+
elem_type = PKL_AST_STRUCT_TYPE_FIELD_TYPE (t);
res = pkl_ast_make_binary_exp (ast, PKL_AST_OP_ADD,
res,
diff --git a/src/pkl-fold.c b/src/pkl-fold.c
index 4c04d9ff..c83d8fdf 100644
--- a/src/pkl-fold.c
+++ b/src/pkl-fold.c
@@ -723,7 +723,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_fold_ps_cast)
pkl_ast_node to_type = PKL_AST_CAST_TYPE (cast);
pkl_ast_node new = NULL;
-
+
if (PKL_AST_TYPE_CODE (from_type) == PKL_TYPE_INTEGRAL
&& PKL_AST_TYPE_CODE (to_type) == PKL_TYPE_INTEGRAL
&& PKL_AST_CODE (exp) == PKL_AST_INTEGER)
@@ -740,7 +740,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_fold_ps_cast)
pkl_ast_node to_unit = PKL_AST_TYPE_O_UNIT (to_type);
pkl_ast_node from_base_type = PKL_AST_TYPE_O_BASE_TYPE (from_type);
pkl_ast_node to_base_type = PKL_AST_TYPE_O_BASE_TYPE (to_type);
-
+
if (PKL_AST_CODE (magnitude) != PKL_AST_INTEGER
|| PKL_AST_CODE (unit) != PKL_AST_INTEGER
|| PKL_AST_CODE (to_unit) != PKL_AST_INTEGER)
@@ -771,7 +771,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_fold_ps_cast)
= (PKL_AST_INTEGER_VALUE (magnitude)
/ PKL_AST_INTEGER_VALUE (unit));
-
+
new = pkl_ast_make_offset (PKL_PASS_AST,
magnitude, unit);
}
diff --git a/src/pkl-gen.c b/src/pkl-gen.c
index a6eaaf45..62011e9b 100644
--- a/src/pkl-gen.c
+++ b/src/pkl-gen.c
@@ -1499,7 +1499,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_gen_pr_map)
transforming to bit offsets at compile time. */
if (PKL_AST_CODE (map_offset) == PKL_AST_OFFSET)
map_offset_magnitude = PKL_AST_OFFSET_MAGNITUDE (map_offset);
-
+
if (map_offset_magnitude
&& PKL_AST_CODE (map_offset_magnitude) == PKL_AST_INTEGER)
{
diff --git a/src/pkl-lex.l b/src/pkl-lex.l
index 8e85afe6..86bdb7c6 100644
--- a/src/pkl-lex.l
+++ b/src/pkl-lex.l
@@ -175,7 +175,7 @@ D [0-9]
return INTEGER;
}
-
+
"__FILE__" {
pkl_ast_node type
= pkl_ast_make_string_type (yyextra->ast);
diff --git a/src/pkl-promo.c b/src/pkl-promo.c
index 54c6615e..06e9b439 100644
--- a/src/pkl-promo.c
+++ b/src/pkl-promo.c
@@ -96,7 +96,7 @@ promote_offset (pkl_ast ast,
&& (PKL_AST_INTEGER_VALUE (a_type_unit)
== PKL_AST_INTEGER_VALUE (unit)))
different_units = 0;
-
+
if (a_type_base_type_size != size
|| a_type_base_type_sign != sign
|| different_units)
@@ -335,7 +335,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_promo_ps_op_add_sub_mod)
size_t size = PKL_AST_TYPE_I_SIZE (base_type);
int sign = PKL_AST_TYPE_I_SIGNED (base_type);
-
+
if (!promote_offset (PKL_PASS_AST,
size, sign, unit,
&PKL_AST_EXP_OPERAND (exp, 0), &restart1))
@@ -527,7 +527,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_promo_ps_op_rela)
goto error;
pkl_ast_node_free (unit_bit);
-
+
PKL_PASS_RESTART = restart1 || restart2;
break;
case PKL_TYPE_STRING:
@@ -740,7 +740,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_promo_ps_type_array)
ASTREF (unit_bit);
PKL_AST_LOC (unit_bit) = PKL_AST_LOC (PKL_PASS_NODE);
-
+
if (!promote_offset (PKL_PASS_AST,
64, 0, unit_bit,
&PKL_AST_TYPE_A_BOUND (array_type), &restart))
@@ -1256,7 +1256,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_promo_ps_map)
ASTREF (unit_bit);
PKL_AST_LOC (unit_bit) = PKL_AST_LOC (PKL_PASS_NODE);
-
+
if (!promote_offset (PKL_PASS_AST,
64, 0, unit_bit,
&PKL_AST_MAP_OFFSET (map),
diff --git a/src/pkl-typify.c b/src/pkl-typify.c
index 7b88742b..c95cdd55 100644
--- a/src/pkl-typify.c
+++ b/src/pkl-typify.c
@@ -294,7 +294,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_typify1_ps_cast)
PKL_TYPIFY_PAYLOAD->errors++;
PKL_PASS_ERROR;
}
-
+
/* Casting to ANY is always forbidden. But casting from ANY is
always allowed. */
if (PKL_AST_TYPE_CODE (type) == PKL_TYPE_ANY)
@@ -307,7 +307,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_typify1_ps_cast)
if (PKL_AST_TYPE_CODE (exp_type) == PKL_TYPE_ANY)
goto done;
-
+
/* Casting from offset to offset is allowed, but not any other cast
involving offsets. */
if (PKL_AST_TYPE_CODE (type) == PKL_TYPE_OFFSET
@@ -1606,7 +1606,7 @@ PKL_PHASE_BEGIN_HANDLER (pkl_typify1_ps_map)
PKL_TYPIFY_PAYLOAD->errors++;
PKL_PASS_ERROR;
}
-
+
if (PKL_AST_TYPE_CODE (map_offset_type) != PKL_TYPE_OFFSET)
{
PKL_ERROR (PKL_AST_LOC (map_offset),
diff --git a/src/pvm.jitter b/src/pvm.jitter
index 46ddf7d4..763a195a 100644
--- a/src/pvm.jitter
+++ b/src/pvm.jitter
@@ -1993,7 +1993,7 @@ instruction aseto () # ( ARR ULONG BOFF -- ARR )
if (idx < 0 || idx >= PVM_VAL_INTEGRAL (PVM_VAL_ARR_NELEM (arr)))
PVM_RAISE (PVM_E_OUT_OF_BOUNDS);
- PVM_VAL_ARR_ELEM_OFFSET (arr, idx) = boff;
+ PVM_VAL_ARR_ELEM_OFFSET (arr, idx) = boff;
end
end
@@ -2688,7 +2688,7 @@ instruction pokes ()
PVM_RAISE (PVM_E_EOF);
else
PVM_RAISE (PVM_E_IO);
- }
+ }
end
end
diff --git a/testsuite/poke.pkl/cast-offsets-diag-2.pk
b/testsuite/poke.pkl/cast-offsets-diag-2.pk
index e12fdb2e..95cead75 100644
--- a/testsuite/poke.pkl/cast-offsets-diag-2.pk
+++ b/testsuite/poke.pkl/cast-offsets-diag-2.pk
@@ -1,4 +1,3 @@
/* { dg-do compile } */
defvar x = "23#B" as offset<int,B>; /* { dg-error "not allowed" } */
-
diff --git a/testsuite/poke.pkl/cast-void-diag-1.pk
b/testsuite/poke.pkl/cast-void-diag-1.pk
index 0851baed..8ddd1fb2 100644
--- a/testsuite/poke.pkl/cast-void-diag-1.pk
+++ b/testsuite/poke.pkl/cast-void-diag-1.pk
@@ -3,4 +3,3 @@
deftype Pac0et = struct { };
defvar x=0 as void ; /* { dg-error "not allowed" } */
-
diff --git a/testsuite/poke.pkl/trim-diag-5.pk
b/testsuite/poke.pkl/trim-diag-5.pk
index be589403..758ebbe9 100644
--- a/testsuite/poke.pkl/trim-diag-5.pk
+++ b/testsuite/poke.pkl/trim-diag-5.pk
@@ -1,4 +1,3 @@
/* { dg-do compile } */
defvar t = 111111111111111[1:2]; /* { dg-error "" } */
-
--
2.25.0