64-bit transition part 12: ksh93 lexing, parsing and subshells#967
64-bit transition part 12: ksh93 lexing, parsing and subshells#967
Conversation
This is the twelfth of the thickfold patch series, which enables ksh93
to operate within a 64-bit address space.
The parts of ksh93 affected by this commit are:
- The lexing and parsing components in lex.c, parse.c, fcin.c
and trestore.c.
- Added an assert() after stkalloc() to fix the following
LTO warning:
warning: 'memset' writing 60 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
1819 | memset(ioq,0,sizeof(*ioq));
| ^
lto1: note: destination object is likely at address zero
- Minor fixes for the virtual subshell mechanism.
- The code underlying shcomp(1), aka sh_tdump().
- A minor fix to a cast in sh_timeradd().
Change in the number of warnings on Linux when compiling with clang using
-Wsign-compare -Wshorten-64-to-32 -Wsign-conversion -Wimplicit-int-conversion:
481 => 352 => 37 (progression from part 11 => part 12 => part 13)
Progresses ksh93#592
Sorry but I don't want to add asserts to silence incorrect compiler warnings, in part because asserts should be getting compiled out on release builds, in part because that's not what asserts are for. I get why you've been adding a lot of typecasts to silence warnings in extra-paranoid warning modes – it helps you isolate the warnings that tell you where variable types need to change to accommodate large objects in 64-bit address spaces. But this particular warning here is simply wrong, and this isn't the right way to silence it. If it really annoys you, fair enough; you could instead add a #pragma to disable the warning, with a short comment explaining the reason for adding it. |
This is the twelfth of the thickfold patch series, which enables ksh93 to operate within a 64-bit address space. The parts of ksh93 affected by this commit are: - The lexing and parsing components in lex.c, parse.c, fcin.c and trestore.c. - Minor fixes for the virtual subshell mechanism. - The code underlying shcomp(1), aka sh_tdump(). - A minor fix to a cast in sh_timeradd(). Change in the number of warnings on Linux when compiling with clang using -Wsign-compare -Wshorten-64-to-32 -Wsign-conversion -Wimplicit-int-conversion: 481 => 352 => 37 (progression from part 11 => part 12 => part 13) Progresses #592
This is the twelfth of the thickfold patch series, which enables ksh93 to operate within a 64-bit address space.
The parts of ksh93 affected by this commit are:
assert()afterstkalloc()to fix the following LTO warning:shcomp, akash_tdump().sh_timeradd().Change in the number of warnings on Linux when compiling with clang using
-Wsign-compare -Wshorten-64-to-32 -Wsign-conversion -Wimplicit-int-conversion: 481 => 352 => 37 (progression from part 11 => part 12 => part 13)Progresses #592