Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
8860ddab
Commit
8860ddab
authored
Mar 15, 2001
by
Michael Meissner
Committed by
Michael Meissner
Mar 15, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence warning
From-SVN: r40511
parent
b216e516
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
32 deletions
+45
-32
libiberty/ChangeLog
+5
-0
libiberty/hashtab.c
+40
-32
No files found.
libiberty/ChangeLog
View file @
8860ddab
2001-03-15 Michael Meissner <meissner@redhat.com>
* hashtab.c (higher_prime_number): Silence warning that 4294967291
might be a signed integer under pre-ISO C systems.
2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
John David Anglin <dave@hiauly1.hia.nrc.ca>
...
...
libiberty/hashtab.c
View file @
8860ddab
/* An expandable hash tables datatype.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000
, 2001
Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This file is part of the libiberty library.
...
...
@@ -71,6 +71,14 @@ static PTR *find_empty_slot_for_expand PARAMS ((htab_t, hashval_t));
htab_hash
htab_hash_pointer
=
hash_pointer
;
htab_eq
htab_eq_pointer
=
eq_pointer
;
/* This avoids a warning that 4294967291 is signed for pre-ISO C systems and
unsigned for ISO C systems on 32-bit hosts. */
#ifdef __STDC__
#define UL(num) num ## UL
#else
#define UL(num) ((unsigned long)(num
/**/
L))
#endif
/* The following function returns a nearest prime number which is
greater than N, and near a power of two. */
...
...
@@ -81,37 +89,37 @@ higher_prime_number (n)
/* These are primes that are near, but slightly smaller than, a
power of two. */
static
unsigned
long
primes
[]
=
{
2
,
7
,
13
,
31
,
61
,
127
,
251
,
509
,
1021
,
2039
,
4093
,
8191
,
16381
,
32749
,
65521
,
131071
,
262139
,
524287
,
1048573
,
2097143
,
4194301
,
8388593
,
16777213
,
33554393
,
67108859
,
134217689
,
268435399
,
536870909
,
1073741789
,
2147483647
,
4294967291
UL
(
2
)
,
UL
(
7
)
,
UL
(
13
)
,
UL
(
31
)
,
UL
(
61
)
,
UL
(
127
)
,
UL
(
251
)
,
UL
(
509
)
,
UL
(
1021
)
,
UL
(
2039
)
,
UL
(
4093
)
,
UL
(
8191
)
,
UL
(
16381
)
,
UL
(
32749
)
,
UL
(
65521
)
,
UL
(
131071
)
,
UL
(
262139
)
,
UL
(
524287
)
,
UL
(
1048573
)
,
UL
(
2097143
)
,
UL
(
4194301
)
,
UL
(
8388593
)
,
UL
(
16777213
)
,
UL
(
33554393
)
,
UL
(
67108859
)
,
UL
(
134217689
)
,
UL
(
268435399
)
,
UL
(
536870909
)
,
UL
(
1073741789
)
,
UL
(
2147483647
)
,
UL
(
4294967291
),
};
unsigned
long
*
low
=
&
primes
[
0
];
...
...
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