size_t/ptrdiff_t transition part 5: the libast zakkaya#954
Merged
size_t/ptrdiff_t transition part 5: the libast zakkaya#954
Conversation
This is the fifth 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 libast compatibility functions. - The libast miscellaneous functions (e.g. optget and friends). - The libast portability functions. Remarks: - The second argument of getfsstat can either be a long (FreeBSD) or a size_t (OpenBSD). This patch opts to cast the second argument as a size_t, which will produce a warning on FreeBSD and no warning on OpenBSD. - Fixed a misplaced noreturn attribute for _ast_assertfail and added noreturn to debug_fatal() (whichs ends with abort()). - Marked error_break(), typefix(), and various CDT functions as static to reflect actual usage. Change in the number of warnings on Linux when compiling with clang using -Wsign-compare -Wshorten-64-to-32 -Wsign-conversion -Wimplicit-int-conversion: 2,450 => 1,946 => 37 (progression from part 4 => part 5 => part 13) Progresses ksh93#592
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the fifth 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:
optget()and friends).staticfunction fixes).struniq()(now takes aptrdiff_tand returns aptrdiff_t; for ASTglob().Remarks:
getfsstat()can either be along(FreeBSD) or asize_t(OpenBSD). This patch opts to cast the second argument as asize_t, which will produce a warning on FreeBSD and no warning on OpenBSD.noreturnattribute for_ast_assertfailand addednoreturntodebug_fatal()(which ends withabort()).error_break(),typefix(), and various CDT functions asstaticto reflect actual usage.Change in the number of warnings on Linux when compiling with clang using
-Wsign-compare -Wshorten-64-to-32 -Wsign-conversion -Wimplicit-int-conversion: 2,450 => 1,946 => 37 (progression from part 4 => part 5 => part 13)Progresses #592