[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: [Pcc] CPP buffer size seems woefully inadequate
From:       Somchai Smythe <buraphalinuxserver () gmail ! com>
Date:       2016-10-10 6:53:37
Message-ID: CAFJqGkO67FVHNYQ5mjD_005cSzhX9-LknRWeL=CZz6GcCt7KgA () mail ! gmail ! com
[Download RAW message or body]

Hello,

I tested with the snapshots of pcc and pcc-libs dated 20161008 and as
you say, everything is fixed and working well.

Thank you for fixing it.

On 10/8/16, Anders Magnusson <ragge@ludd.ltu.se> wrote:
> Hi,
>
> I don't know if you got an answer on this, but this was a bug that was
> fixed last week I assume.
>
> -- Ragge
>
> Den 2016-09-19 kl. 08:54, skrev Somchai Smythe:
>> Hello pcc list,
>>
>> I don't know how to debug this.  Does anybody on the mailing list have
>> some suggestions?  I built from the 20160919 pcc and pcc-libs
>> tarballs, and I can compile and run a hello world problem without
>> problems.  I'm on an Ubuntu 16.04.1 system and installed pcc in
>> /usr/local if it matters.  I tried various guesses for -std= like c89,
>> c99, and c11 but it didn't make any difference.  I tried gnu89, gnu99,
>> and gnu11 (but gnu11 seemed to be unrecognized) and again it didn't
>> make any difference.  I'm on an intel Core i7-4790 and running in
>> 64bit mode and I've got lots of RAM free but it looks like some buffer
>> is chopped off.
>>
>> $ free
>>                total        used        free      shared  buff/cache
>> available
>> Mem:       32789568      536824    17912880       69712    14339864
>> 31737608
>> Swap:             0           0           0
>> $ pcc -Wall -Wextra -pedantic -DUNIT_TEST robert1.c -o robert1
>> /usr/local/lib/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include//stddef.h,
>> line 0: warning: # 1 "/usr/local/lib/pcc/x86_: illegal control
>> /usr/lib/x86_64-linux-gnu/crt1.o: In function `_start':
>> (.text+0x20): undefined reference to `main'
>> error: ld terminated with status 1
>> $ pcc --version
>> Portable C Compiler 1.2.0.DEVEL 20160827 for x86_64-unknown-linux-gnu
>> $ cat
>> /usr/local/lib/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include//stddef.h
>> #include <libpcc_stddef.h>
>> $ head
>> /usr/local/lib/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/libpcc_stddef.h
>> #ifndef _LIBPCC_STDDEF_H_
>>
>> #if !defined(__need_wchar_t) && !defined(__need_size_t) \
>>      && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \
>>      && !defined(__need_wint_t)
>> #define _LIBPCC_STDDEF_H_
>> #endif
>>
>> #if defined(_LIBPCC_STDDEF_H_) || defined(__need_ptrdiff_t)
>> #if !defined(_PTRDIFF_T) && !defined(__ptrdiff_t_defined)
>> ________________________________________________________________________
>>
>> At this point I really got motivated to see if it was the
>> preprocessor.....
>> ________________________________________________________________________
>>
>> $ pcc -Wall -Wextra -pedantic -DUNIT_TEST -E robert1.c -o robert1.PP
>> $ ls -ld robert1.PP
>> -rw------- 1 mrham mrham 16384 Sep 19 13:36 robert1.PP
>> $ tail robert1.PP
>>
>>
>> extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ ));
>> # 942 "/usr/include//stdio.h" 3
>>
>> # 7 "robert1.c"
>>
>> # 1
>> "/usr/local/lib/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include//stddef.h"
>> 3
>>
>> # 1 "/usr/local/lib/pcc/x86_
>>
>> [snip wild and wrong theory about the bug]
>>
>> Thanks!
_______________________________________________
Pcc mailing list
Pcc@lists.ludd.ltu.se
https://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic