Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
8efa9bfe
Commit
8efa9bfe
authored
Jun 23, 2003
by
Till Riedel
Browse files
eliminated compiler wearnings
[r1388]
parent
1d265ff5
Changes
10
Hide whitespace changes
Inline
Side-by-side
ir/st/st.c
View file @
8efa9bfe
...
...
@@ -31,7 +31,7 @@
# include "misc.h"
/* init globals: */
static
dtree_t
*
trees
=
0
;
/*
static
*/
dtree_t
*
trees
=
0
;
/*
static dtree_t *last = 0;
*/
...
...
ir/tr/entity.c
View file @
8efa9bfe
...
...
@@ -290,8 +290,8 @@ set_entity_visibility (entity *ent, ent_visibility vis) {
if
(
vis
!=
local
)
assert
((
ent
->
allocation
==
static_allocated
)
||
(
ent
->
allocation
==
automatic_allocated
));
/
/
@@@ Test that the owner type is not local, but how??
//
&& get_class_visibility(get_entity_owner(ent)) != local));
/
*
@@@ Test that the owner type is not local, but how??
&& get_class_visibility(get_entity_owner(ent)) != local));
*/
ent
->
visibility
=
vis
;
}
...
...
ir/tr/trvrfy.c
View file @
8efa9bfe
...
...
@@ -10,19 +10,19 @@ static int check_class(type *tp) {
int
i
,
j
,
k
;
int
found
;
/
/
printf("\n"); DDMT(tp);
/
*
printf("\n"); DDMT(tp);
*/
for
(
i
=
0
;
i
<
get_class_n_members
(
tp
);
i
++
)
{
entity
*
mem
=
get_class_member
(
tp
,
i
);
assert
(
mem
&&
"NULL members not allowed"
);
/
/
printf(" %d, %d", get_entity_n_overwrites(mem), get_class_n_supertypes(tp)); DDME(mem);
/
*
printf(" %d, %d", get_entity_n_overwrites(mem), get_class_n_supertypes(tp)); DDME(mem);
*/
if
(
!
mem
)
return
error_null_mem
;
assert
(
get_entity_n_overwrites
(
mem
)
<=
get_class_n_supertypes
(
tp
));
for
(
j
=
0
;
j
<
get_entity_n_overwrites
(
mem
);
j
++
)
{
entity
*
ovw
=
get_entity_overwrites
(
mem
,
j
);
/
/
printf(" overwrites: "); DDME(ovw);
/
*
printf(" overwrites: "); DDME(ovw);
*/
/* Check whether ovw is member of one of tp's supertypes. If so,
the representation is correct. */
found
=
false
;
...
...
ir/tr/trvrfy.h
View file @
8efa9bfe
...
...
@@ -26,7 +26,7 @@ enum trvrfy_error_codes {
no_error
=
0
,
/**< no error */
error_ent_not_cont
=
1
,
/**< overwritten entity not in superclass */
error_null_mem
=
2
,
/**< compound contains NULL member */
error_const_on_wrong_irg
=
3
,
/**< constant placed on wrong IRG */
error_const_on_wrong_irg
=
3
/**< constant placed on wrong IRG */
};
...
...
ir/tr/typewalk.c
View file @
8efa9bfe
...
...
@@ -23,14 +23,15 @@
#include "irprog.h"
#include "type_or_entity.h"
#include "typegmod.h"
#include "typewalk.h"
/* Make types visible to allow most efficient access */
#include "entity_t.h"
#include "type_t.h"
typedef
struct
type_walk_env
{
void
*
pre
;
void
*
post
;
type_walk_func
*
pre
;
type_walk_func
*
post
;
void
*
env
;
}
type_walk_env
;
...
...
@@ -145,9 +146,13 @@ static void type_walk_2(type_or_ent *tore,
/** Check wether node contains types or entities as an attribute.
If so start a walk over that information. */
static
void
start_type_walk
(
ir_node
*
node
,
void
*
env
)
{
void
*
pre
=
((
type_walk_env
*
)
env
)
->
pre
;
void
*
post
=
((
type_walk_env
*
)
env
)
->
post
;
void
*
envi
=
((
type_walk_env
*
)
env
)
->
env
;
type_walk_func
*
pre
;
type_walk_func
*
post
;
void
*
envi
;
pre
=
((
type_walk_env
*
)
env
)
->
pre
;
post
=
((
type_walk_env
*
)
env
)
->
post
;
envi
=
((
type_walk_env
*
)
env
)
->
env
;
assert
(
node
);
...
...
ir/tv/fltcalc.c
View file @
8efa9bfe
...
...
@@ -156,7 +156,6 @@ void fc_calc(const void *a, const void *b, int opcode)
int
fc_comp
(
const
void
*
a
,
const
void
*
b
)
{
char
buf1
[
40
],
buf2
[
40
];
if
(
CAST_IN
(
a
)
==
CAST_IN
(
b
))
{
return
0
;
...
...
ir/tv/fltcalc.h
View file @
8efa9bfe
...
...
@@ -12,7 +12,7 @@ enum {
FC_SUB
,
FC_MUL
,
FC_DIV
,
FC_NEG
,
FC_NEG
};
#define fc_add(a, b) fc_calc((a), (b), FC_ADD)
...
...
ir/tv/strcalc.c
View file @
8efa9bfe
...
...
@@ -784,7 +784,7 @@ static void _shr(const char *val1, char *buffer, long offset, int radius, unsign
break
;
}
}
if
((
carry_flag
==
0
)
&&
(
_val
(
val1
[
counter
])
&
shift
!=
0
)
)
if
((
carry_flag
==
0
)
&&
(
_val
(
val1
[
counter
])
&
shift
)
!=
0
)
carry_flag
=
1
;
/* shift digits to the right with offset, carry and all */
...
...
@@ -833,13 +833,6 @@ static void _rot(const char *val1, char *buffer, long offset, int radius, unsign
char
temp1
[
CALC_BUFFER_SIZE
];
char
temp2
[
CALC_BUFFER_SIZE
];
const
char
*
shl
;
char
carry
=
SC_0
;
int
counter
,
old_counter
;
int
shift
;
int
bitoffset
;
offset
=
offset
%
radius
;
/* rotation by multiples of the typelength is identity */
...
...
@@ -1216,7 +1209,6 @@ int sc_get_highest_set_bit(const void *value)
{
const
char
*
val
=
(
const
char
*
)
value
;
int
high
,
counter
;
char
sign
;
high
=
CALC_BUFFER_SIZE
*
4
;
...
...
ir/tv/strcalc.h
View file @
8efa9bfe
...
...
@@ -63,7 +63,7 @@ enum {
SC_C
,
SC_D
,
SC_E
,
SC_F
,
SC_F
};
/**
...
...
@@ -83,7 +83,7 @@ enum {
SC_AND
,
/**< Bitwise And */
SC_OR
,
/**< Bitwise Or */
SC_NOT
,
/**< Bitwise Not */
SC_XOR
,
/**< Bitwise Exclusive Or */
SC_XOR
/**< Bitwise Exclusive Or */
};
/**
...
...
@@ -94,7 +94,7 @@ enum base_t {
SC_HEX
,
/**< hexadecimal output with BIG letters */
SC_DEC
,
/**< decimal output */
SC_OCT
,
/**< octal output */
SC_BIN
,
/**< binary output */
SC_BIN
/**< binary output */
};
/*
...
...
ir/tv/tv.c
View file @
8efa9bfe
...
...
@@ -97,8 +97,11 @@ static void _fail_verify(tarval *tv, const char* file, int line)
printf
(
"%s:%d: Invalid tarval (null)"
,
file
,
line
);
assert
(
0
);
}
#ifdef __GNUC__
INLINE
static
void
tarval_verify
(
tarval
*
tv
)
__attribute__
((
unused
));
#endif
inline
static
void
tarval_verify
(
tarval
*
tv
)
INLINE
static
void
tarval_verify
(
tarval
*
tv
)
{
assert
(
tv
);
assert
(
tv
->
mode
);
...
...
@@ -208,6 +211,8 @@ tarval *new_tarval_from_str(const char *str, size_t len, ir_mode *mode)
switch
(
get_mode_sort
(
mode
))
{
case
irms_control_flow
:
case
irms_memory
:
case
irms_auxiliary
:
assert
(
0
);
break
;
...
...
@@ -258,7 +263,7 @@ char *tarval_to_str(tarval *tv)
tarval
*
new_tarval_from_long
(
long
l
,
ir_mode
*
mode
)
{
ANNOUNCE
();
assert
(
mode
&&
!
(
get_mode_sort
(
mode
)
==
irms_auxiliary
));
assert
(
mode
&&
!
(
(
get_mode_sort
(
mode
)
==
irms_memory
)
||
(
get_mode_sort
(
mode
)
==
irms_control_flow
)
||
(
get_mode_sort
(
mode
)
==
irms_auxiliary
))
)
;
switch
(
get_mode_sort
(
mode
))
{
...
...
@@ -340,7 +345,8 @@ int tarval_is_entity(tarval *tv)
ANNOUNCE
();
assert
(
tv
);
/* tv->value == NULL means dereferencing a null pointer */
return
((
get_mode_sort
(
tv
->
mode
)
==
irms_reference
)
&&
(
tv
->
value
!=
NULL
)
&&
(
tv
->
length
==
0
));
return
((
get_mode_sort
(
tv
->
mode
)
==
irms_reference
)
&&
(
tv
->
value
!=
NULL
)
&&
(
tv
->
length
==
0
)
&&
(
tv
!=
tarval_P_void
));
}
entity
*
tarval_to_entity
(
tarval
*
tv
)
...
...
@@ -425,6 +431,8 @@ tarval *get_tarval_max(ir_mode *mode)
switch
(
get_mode_sort
(
mode
))
{
case
irms_reference
:
case
irms_control_flow
:
case
irms_memory
:
case
irms_auxiliary
:
assert
(
0
);
break
;
...
...
@@ -452,6 +460,8 @@ tarval *get_tarval_min(ir_mode *mode)
switch
(
get_mode_sort
(
mode
))
{
case
irms_reference
:
case
irms_control_flow
:
case
irms_memory
:
case
irms_auxiliary
:
assert
(
0
);
break
;
...
...
@@ -478,6 +488,8 @@ tarval *get_tarval_null(ir_mode *mode)
switch
(
get_mode_sort
(
mode
))
{
case
irms_control_flow
:
case
irms_memory
:
case
irms_auxiliary
:
case
irms_internal_boolean
:
assert
(
0
);
...
...
@@ -503,6 +515,8 @@ tarval *get_tarval_one(ir_mode *mode)
switch
(
get_mode_sort
(
mode
))
{
case
irms_control_flow
:
case
irms_memory
:
case
irms_auxiliary
:
case
irms_internal_boolean
:
case
irms_reference
:
...
...
@@ -605,6 +619,8 @@ pnc_number tarval_cmp(tarval *a, tarval *b)
/* Here the two tarvals are unequal and of the same mode */
switch
(
get_mode_sort
(
a
->
mode
))
{
case
irms_control_flow
:
case
irms_memory
:
case
irms_auxiliary
:
return
False
;
...
...
@@ -629,9 +645,9 @@ pnc_number tarval_cmp(tarval *a, tarval *b)
*/
tarval
*
tarval_convert_to
(
tarval
*
src
,
ir_mode
*
m
)
{
ANNOUNCE
();
tarval
tv
;
ANNOUNCE
();
assert
(
src
);
assert
(
m
);
...
...
@@ -639,6 +655,8 @@ tarval *tarval_convert_to(tarval *src, ir_mode *m)
switch
(
get_mode_sort
(
src
->
mode
))
{
case
irms_control_flow
:
case
irms_memory
:
case
irms_auxiliary
:
break
;
...
...
@@ -1082,6 +1100,8 @@ int tarval_snprintf(char *buf, size_t len, tarval *tv)
return
snprintf
(
buf
,
len
,
"%s%s%s"
,
prefix
,
(
tv
==
tarval_b_true
)
?
"true"
:
"false"
,
suffix
);
}
case
irms_control_flow
:
case
irms_memory
:
case
irms_auxiliary
:
return
snprintf
(
buf
,
len
,
"<BAD>"
);
}
...
...
Write
Preview
Markdown
is supported
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