Skip to content

[skip-ci][core] document that char is not guaranteed to be signed #19614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/foundation/inc/RtypesCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class TRootIOCtor;

//---- types -------------------------------------------------------------------

typedef char Char_t; ///< Signed Character 1 byte (char) \deprecated Consider replacing with `char` or `std::int8_t`
typedef char Char_t; ///< Character 1 byte (char) \warning Can be signed (most common) or unsigned depending on platform and compiler flags. \deprecated Consider replacing with `char`, `signed char` or `std::int8_t`
typedef unsigned char UChar_t; ///< Unsigned Character 1 byte (unsigned char) \deprecated Consider replacing with `unsigned char` or `std::uint8_t`
typedef short Short_t; ///< Signed Short integer 2 bytes (short) \deprecated Consider replacing with `short` or `std::int16_t`
typedef unsigned short UShort_t; ///< Unsigned Short integer 2 bytes (unsigned short) \deprecated Consider replacing with `unsigned short` or `std::uint16_t`
Expand Down
4 changes: 2 additions & 2 deletions tree/tree/src/TTree.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ It is strongly recommended to persistify those as objects rather than lists of l
assumed of type F by default. The list of currently supported
types is given below:
- `C` : a character string terminated by the 0 character
- `B` : an 8 bit signed integer (`Char_t`); Treated as a character when in an array.
- `B` : an 8 bit integer (`Char_t`); Mostly signed, might be unsigned in special platforms or depending on compiler flags, thus do not use std::int8_t as underlying variable since they are not equivalent; Treated as a character when in an array.
- `b` : an 8 bit unsigned integer (`UChar_t`)
- `S` : a 16 bit signed integer (`Short_t`)
- `s` : a 16 bit unsigned integer (`UShort_t`)
Expand Down Expand Up @@ -1971,7 +1971,7 @@ Int_t TTree::Branch(const char* foldername, Int_t bufsize /* = 32000 */, Int_t s
/// variable. If the first variable does not have a type, it is assumed
/// of type F by default. The list of currently supported types is given below:
/// - `C` : a character string terminated by the 0 character
/// - `B` : an 8 bit signed integer (`Char_t`); Treated as a character when in an array.
/// - `B` : an 8 bit integer (`Char_t`); Mostly signed, might be unsigned in special platforms or depending on compiler flags, thus do not use std::int8_t as underlying variable since they are not equivalent; Treated as a character when in an array.
/// - `b` : an 8 bit unsigned integer (`UChar_t`)
/// - `S` : a 16 bit signed integer (`Short_t`)
/// - `s` : a 16 bit unsigned integer (`UShort_t`)
Expand Down