Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
68ed90d8
Commit
68ed90d8
authored
Mar 25, 2008
by
Ian Lynagh
Browse files
Fix warnings in the RTS
For some reason this causes build failures for me in my 32-bit chroot,
parent
a7d2d334
Changes
3
Hide whitespace changes
Inline
Side-by-side
includes/Cmm.h
View file @
68ed90d8
...
...
@@ -407,9 +407,12 @@
#define BITMAP_BITS(bitmap) ((bitmap) >> BITMAP_BITS_SHIFT)
/* Debugging macros */
#define LOOKS_LIKE_INFO_PTR(p) \
((p) != NULL && \
(TO_W_(%INFO_TYPE(%STD_INFO(p))) != INVALID_OBJECT) && \
#define LOOKS_LIKE_INFO_PTR(p) \
((p) != NULL && \
LOOKS_LIKE_INFO_PTR_NOT_NULL(p))
#define LOOKS_LIKE_INFO_PTR_NOT_NULL(p) \
( (TO_W_(%INFO_TYPE(%STD_INFO(p))) != INVALID_OBJECT) && \
(TO_W_(%INFO_TYPE(%STD_INFO(p))) < N_CLOSURE_TYPES))
#define LOOKS_LIKE_CLOSURE_PTR(p) (LOOKS_LIKE_INFO_PTR(GET_INFO(UNTAG(p))))
...
...
includes/Storage.h
View file @
68ed90d8
...
...
@@ -304,7 +304,10 @@ void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p);
-------------------------------------------------------------------------- */
#define LOOKS_LIKE_INFO_PTR(p) \
(p && ((StgInfoTable *)(INFO_PTR_TO_STRUCT(p)))->type != INVALID_OBJECT && \
(p && LOOKS_LIKE_INFO_PTR_NOT_NULL(p))
#define LOOKS_LIKE_INFO_PTR_NOT_NULL(p) \
(((StgInfoTable *)(INFO_PTR_TO_STRUCT(p)))->type != INVALID_OBJECT && \
((StgInfoTable *)(INFO_PTR_TO_STRUCT(p)))->type < N_CLOSURE_TYPES)
#define LOOKS_LIKE_CLOSURE_PTR(p) \
...
...
rts/sm/Storage.c
View file @
68ed90d8
...
...
@@ -116,7 +116,8 @@ initStorage( void )
/* Sanity check to make sure the LOOKS_LIKE_ macros appear to be
* doing something reasonable.
*/
ASSERT
(
LOOKS_LIKE_INFO_PTR
(
&
stg_BLACKHOLE_info
));
/* We use the NOT_NULL variant or gcc warns that the test is always true */
ASSERT
(
LOOKS_LIKE_INFO_PTR_NOT_NULL
(
&
stg_BLACKHOLE_info
));
ASSERT
(
LOOKS_LIKE_CLOSURE_PTR
(
&
stg_dummy_ret_closure
));
ASSERT
(
!
HEAP_ALLOCED
(
&
stg_dummy_ret_closure
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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