/[bison]/bison/ChangeLog
ViewVC logotype

Diff of /bison/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.844 by eggert, Mon Oct 7 19:58:00 2002 UTC revision 1.845 by eggert, Thu Oct 10 07:38:40 2002 UTC
# Line 1  Line 1 
1    2002-10-10  Paul Eggert  <eggert@twinsun.com>
2    
3            Portability fixes for bitsets; this also avoids several GCC
4            warnings.
5    
6            * lib/abitset.c: Include <stddef.h>, for offsetof.
7            * lib/lbitset.c: Likewise.
8    
9            * lib/abitset.c (abitset_bytes): Return a size that is aligned
10            properly for vectors of objects.  Do not assume that adding a
11            header size to a multiple of a word size yields a value that is
12            properly aligned for the whole union.
13            * lib/bitsetv.c (bitsetv_alloc): Likewise.
14    
15            * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
16            unique names for structures.
17            * lib/ebitset.c (ebitset_bytes): Likewise.
18            * lib/lbitset.c (lbitset_bytes): Likewise.
19    
20            * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
21            abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
22            abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
23            abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
24            abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
25            abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
26            abitset_or_and_cmp, abitset_copy): Supply prototype decls,
27            to improve the type-checking that GCC can do.
28            * lib/bitset.c (bitset_op4_cmp): Likewise.
29            * lib/bitset_stats.c (bitset_stats_count,
30            bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
31            bitset_stats_copy, bitset_stats_disjoint_p,
32            bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
33            bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
34            bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
35            bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
36            bitset_stats_and_or_cmp, bitset_stats_andn_or,
37            bitset_stats_andn_or_cmp, bitset_stats_or_and,
38            bitset_stats_or_and_cmp): Likewise.
39            * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
40            lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
41            lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
42            lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
43    
44            * lib/abitset.h: Include bitset.h, not bbitset.h.
45            * lib/ebitset.h: Likewise.
46            * lib/lbitset.h: Likewise.
47    
48            * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
49            All instances of parameters of type enum bitset_opts are now of
50            type enum_bitset_opts, to conform to the C Standard, and similarly
51            for enum_bitset_type.
52            * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
53            * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
54    
55            Do not use "struct bitset_struct" to mean different things in
56            different modules.  Not only is this confusing, it violates
57            the C Standard, which requires that structure types in different
58            modules must be compatible if one is to be passed to the other.
59            * lib/bbitset.h (bitset): Now points to a union, not to a struct.
60            All instances of "struct bitset_struct *" replaced with "bitset".
61            * lib/bitset.h (struct bitset_struct): Remove, replacing with....
62            (union bitset_union, struct abitset_struct, struct ebitset_struct,
63            struct lbitset_struct, struct bitset_stats_struct): New types.
64            All uses of struct bitset_struct changed to union bitset_union,
65            etc.
66            * lib/abitset.c (struct abitset_struct, abitset,
67            struct bitset_struct): Remove.
68            * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
69            struct bitset_struct): Remove.
70            * lib/ebitset.c (struct ebitset_struct, ebitset, struct
71            bitset_struct): Remove.
72            * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
73            Likewise.
74    
75            Do not call a function of type T using a call that assumes the
76            function is of a different type U.  Standard C requires that a
77            function must be called with a type that is compatible with its
78            definition.
79            * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
80            New decls.
81            * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
82            New functions.
83            * lib/ebitset.c (PFV): Remove.
84            * lib/lbitset.c (PFV): Likewise.
85            * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
86            ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
87            decls.
88            (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
89            (ebitset_vtable): Use them.
90            * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
91            lbitset_xor): New functions.
92            (lbitset_vtable): Use them.
93    
94            * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
95            Declare.
96    
97            * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
98            GCC warning.
99            * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
100            Use offsetof, for simplicity.
101    
102  2002-10-06  Paul Eggert  <eggert@twinsun.com>  2002-10-06  Paul Eggert  <eggert@twinsun.com>
103    
104          * lib/bitset.h (bitset_reset): Do not assume that bitset_word is          * lib/bitset.h (bitset_reset): Do not assume that bitset_word is

Legend:
Removed from v.1.844  
changed lines
  Added in v.1.845

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26