Skip to content

Commit b36f1c8

Browse files
authored
[Xtensa] Default to unsigned char
This matches GCC. Partially addresses #115964 Pull Request: #115967
1 parent 681bd84 commit b36f1c8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) {
13481348
case llvm::Triple::riscv64:
13491349
case llvm::Triple::systemz:
13501350
case llvm::Triple::xcore:
1351+
case llvm::Triple::xtensa:
13511352
return false;
13521353
}
13531354
}

clang/test/Driver/xtensa-char.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/// Check that char is unsigned by default.
2+
// RUN: %clang -### %s --target=xtensa -c 2>&1 | FileCheck %s
3+
// CHECK: "-cc1" "-triple" "xtensa"
4+
// CHECK-SAME: "-fno-signed-char"

0 commit comments

Comments
 (0)