tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Linux off_t casting?


From: charlesrandall4-tinycc
Subject: Re: [Tinycc-devel] Linux off_t casting?
Date: Fri, 15 Jul 2005 23:59:20 -0700 (PDT)

[Apologies. I first replied only to Dave. This is to
the list.]

--- Dave Dodge <address@hidden> wrote:
> No problem here, either (also glibc 2.3.2).

address@hidden tcc-apps]$ uname -a
Linux Fedora3VM 2.6.11-1.35_FC3 #1 Mon Jun 13 00:52:08
EDT 2005 i686 athlon i386 GNU/Linux

address@hidden tcc-apps]$ rpm -q glibc
glibc-2.3.5-0.fc3.1

> I'd suggest poking around in the header files to see
> how off_t is
> defined on that machine, or if there are any macros
> interfering with
> the test program.  "gcc -E" might be useful.

See the attached output of gcc -E. If I strip the line
numbers and define the __asm__ macro to do nothing,
then tcc compiles this fine. This appears to indicate
that this may be a pre-processing bug.

Based on the output of gcc -E, I've appended what
should be the minimial program to reproduce this.
Unfortunately, this compiles fine with tcc.

I've tried both the latest from cvs and the 0.9.3
release.

-Charles

address@hidden tcc-apps]$ cat -n off_t-simple.c
     1  __extension__ typedef long long int __quad_t;
     2  __extension__ typedef __quad_t __off64_t;
     3  typedef __off64_t off_t;
     4
     5  int main(void)
     6  {
     7    off_t j;
     8    j = 0;     /* cast required */
     9    j++;       /* does not work */
    10    j = j + 4; /* casts required */
    11    return 0;
    12  }


Charles F. Randall, IV
address@hidden (always forwarded)

Attachment: off_t-E.c.gz
Description: 2632647174-off_t-E.c.gz


reply via email to

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