[Top][All Lists]

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

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

From: Volodymyr Boyko
Subject: Re: [Tinycc-devel] sizeof("string literal") is very wrong
Date: Thu, 4 Aug 2022 12:54:31 +0300

replace %d with %zu

On Thu, Aug 4, 2022 at 12:47 PM Karl Yerkes <karl.yerkes@gmail.com> wrote:
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

Tinycc-devel mailing list

reply via email to

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