Skip to content

Commit

Permalink
patch 8.2.0530: test crashes on s390
Browse files Browse the repository at this point in the history
Problem:    Test crashes on s390. (James McCoy)
Solution:   Explicitly define an 8 big signed type. (closes #5897)
  • Loading branch information
brammool committed Apr 8, 2020
1 parent 49cf7cc commit a65c288
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/structs.h
Expand Up @@ -1290,6 +1290,10 @@ typedef long_u hash_T; // Type for hi_hash
# endif
#endif

// On rare systems "char" is unsigned, sometimes we really want a signed 8-bit

This comment has been minimized.

Copy link
@ichizok

ichizok Apr 8, 2020

Contributor

Sorry to nitpick, also on ARM and PowerPC "char" is unsigined so the description "rare systems" feels not appropriate...

This comment has been minimized.

Copy link
@brammool

brammool via email Apr 8, 2020

Author Contributor

This comment has been minimized.

Copy link
@jamessan

jamessan Apr 8, 2020

Contributor

It has nothing to do with the compiler. It is an architecture-specific decision. That's specifically why the C standard didn't define the sign.

This comment has been minimized.

Copy link
@jamessan

jamessan Apr 8, 2020

Contributor

Debian's architecture specifics has details about this and lots of other details. It's one of my first references to check for commonality when a subset of Debian builds fails.

This comment has been minimized.

Copy link
@k-takata

k-takata Apr 9, 2020

Member

MSVC has the option /J which implies Japanese. Unsigned char was useful for handling multibyte characters.
Some old x86 compilers in '90s Japan had set char to unsigned by default.
So, it is mostly architecture specific nowadays, but it also depended on compilers.

// value.
typedef signed char int8_T;

typedef double float_T;

typedef struct listvar_S list_T;
Expand Down Expand Up @@ -1342,7 +1346,7 @@ typedef enum
typedef struct type_S type_T;
struct type_S {
vartype_T tt_type;
char tt_argcount; // for func, -1 for unknown
int8_T tt_argcount; // for func, -1 for unknown
char tt_min_argcount; // number of non-optional arguments
char tt_flags; // TTFLAG_ values
type_T *tt_member; // for list, dict, func return type
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -738,6 +738,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
530,
/**/
529,
/**/
Expand Down

0 comments on commit a65c288

Please sign in to comment.