tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] sizeof("string literal") is very wrong


From: Karl Yerkes
Subject: [Tinycc-devel] sizeof("string literal") is very wrong
Date: Thu, 4 Aug 2022 11:46:19 +0200

I am using...

tcc version 0.9.27 HEAD:d3e940c (AArch64 Darwin)

I want to know the size of a string literal:

#include <stdio.h>
int main() {
  printf("%d\n", sizeof("this is a string"));
}

With clang, I see 17.
With tcc, I see 1828565760 (a different large, wrong number each time I execute).

Is this expected behavior or a known issue? Should I use an older or newer version of TCC?

And just out of curiosity, does anyone have a tool that does a binary search of TCC versions to find which version introduced a regression?

-- Karl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]