Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
8c0a4de2
Commit
8c0a4de2
authored
Nov 26, 2001
by
Ronny Wichers Schreur
🏢
Browse files
bug fix in initialisation
parent
df973c64
Changes
2
Hide whitespace changes
Inline
Side-by-side
backendC/CleanCompilerSources/backend.c
View file @
8c0a4de2
...
...
@@ -3411,10 +3411,18 @@ BEStrictPositions (int functionIndex, int *bits, int **positions)
strict_positions
=
ruleType
->
type_alt_strict_positions
;
Assert
(
strict_positions
!=
NULL
);
*
bits
=
strict_positions
->
sp_size
;
*
positions
=
strict_positions
->
sp_bits
;
if
(
strict_positions
==
NULL
)
{
/* this can happen if sa is turned of, or if the sa has failed
(for example when it's out of memory) */
*
bits
=
0
;
*
positions
=
NULL
;
}
else
{
*
bits
=
strict_positions
->
sp_size
;
*
positions
=
strict_positions
->
sp_bits
;
}
}
/* BEStrictPositions */
int
...
...
backendC/CleanCompilerSources/sa.c
View file @
8c0a4de2
...
...
@@ -2910,10 +2910,11 @@ static void StrictPositionsClear (void)
{
int
sizeBytes
;
sizeInts
=
bits2ints
(
kMaxStrict
Position
s
);
sizeInts
=
bits2ints
(
kMaxStrict
Bit
s
);
sizeBytes
=
sizeof
(
StrictPositionsS
)
+
(
sizeInts
-
1
)
*
sizeof
(
int
);
strict_positions
=
CompAlloc
(
sizeBytes
);
for
(
i
=
0
;
i
<
sizeInts
;
i
++
)
strict_positions
->
sp_bits
[
i
]
=
0
;
strict_positions
->
sp_size
=
0
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment