* lib/sh/random.c (genseed): Use a different type, to pacify GCC
"warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]" on platforms with 64-bit pointers
and 32-bit int.
---
lib/sh/random.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sh/random
Do not assume that all pointers have the same representation at
the machine level and that address space is linear, as the C
standard does not guarantee this and it is not true on a few
unusual platforms. Fixing this also uncovered a bug on
conventional 64-bit platforms, where the call 'add_unwind
There's no longer any point to worrying about K&R compilers
as the code won't work with them anyway. Simplify the code
by omitting __STDC__ tests when that merely is checking for
C89 or later, as we assume C89 prototypes now.
---
aclocal.m4| 15 ---
builtins/enable.def
Since we now assume C89 function prototypes anyway,
remove no-longer-used cruft that is used only for
ports to compilers requiring K&R style.
---
aclocal.m4 | 35 +
builtins/common.c | 23 ++
builtins/mkbuiltins.c | 4 ---
builtins/pri
Port more function definitions and declarations to C23.
This includes adding a return type when it defaulted to int.
Add some casts to and from GENERIC_LIST * that are needed
now that the list functions are prototyped.
This does not finish the job, as some trickier functions
still won't work with
On 2023-03-24 12:04, Chet Ramey wrote:
However, Bash's devel branch still has old-style function definitions
and therefore won't compile with a strict C23 compiler. For example,
get_variable_value in variables.c is old-style. I assume there would
be interest in fixing remaining areas where Bash
Paul Eggert writes:
> * lib/sh/random.c (genseed): Use a different type, to pacify GCC
> "warning: cast from pointer to integer of different size
> [-Wpointer-to-int-cast]" on platforms with 64-bit pointers
> and 32-bit int.
Thanks for this one. I've been meaning to report it because
-Wpointer-
---
parse.y | 1 +
1 file changed, 1 insertion(+)
diff --git a/parse.y b/parse.y
index 639912b6..65c1d88a 100644
--- a/parse.y
+++ b/parse.y
@@ -73,6 +73,7 @@
# include "jobs.h"
#else
extern int cleanup_dead_jobs (void);
+extern int count_all_jobs (void);
#endif /* JOB_CONTROL */
#if defi
While C has never guaranteed that pointers all have the same size &
alignment, POSIX does provide this guarantee, although indirectly (it has
to be true for dlsym() to work, for example).
Bash seems to need an environment that's "kinda POSIX" (at least emulating
the POSIX process & signal models),