Anders Magnusson | 1 Aug 2009 18:00
Picon

Update of cpp.

I have done a significant cleanup of cpp, which both made it run
much faster (in about 10% of the time before) and also fixed a set of
bugs that has been around for a while.

...it also means that a number of new bugs probably are introduced :-/

-- Ragge

Detlef Riekenberg | 5 Aug 2009 00:06
Picon

[PATCH] Compile pcc again with gcc 4.3 [try 2]

On Mo, 2009-07-27 at 16:59 +0000, Thorsten Glaser wrote:
> >I prepare a patch later this evening to remove the unwanted
> assignments.
> 
> I'm still strongly against this, and in favour of --enable-werror
> as configure option. Why has nobody replied to that?

Always disable -Werror is not needed.

This Patch use a "write()" during checking for "-Werror"
When warn_unused_result is activated in the system headers,
then -Werror is disabled.

autoconf 2.59 must be called after this patch
(I have only version 2.63 here)

--

-- 

By by ... Detlef
Ted Unangst | 5 Aug 2009 04:43
Picon

Re: [PATCH] Compile pcc again with gcc 4.3 [try 2]

On Tue, Aug 4, 2009 at 6:06 PM, Detlef Riekenberg<pcc.dev <at> web.de> wrote:
> Always disable -Werror is not needed.
>
> This Patch use a "write()" during checking for "-Werror"
> When warn_unused_result is activated in the system headers,
> then -Werror is disabled.

is there a reason not to add a void cast and avoid all this fuss?

or what about checking the error?  from the short context of the
original, it's not clear to me why it wouldn't be better to make sure
write() worked.

Thorsten Glaser | 5 Aug 2009 09:48
Picon
Gravatar

Re: [PATCH] Compile pcc again with gcc 4.3 [try 2]

Ted Unangst dixit:

>On Tue, Aug 4, 2009 at 6:06 PM, Detlef Riekenberg<pcc.dev <at> web.de> wrote:

[ my --enable-werror suggestion ]

>> Always disable -Werror is not needed.

On some platforms, it is. The current system is evil hackery anyway.
Makefile should not butcher CFLAGS like this.

For what it’s worth, --disable-werror is the same, just a different
default. How does t̲h̲a̲t̲ sound?

>is there a reason not to add a void cast and avoid all this fuss?

gcc ignores that cast to void. Damn pile of crap, it is.

>or what about checking the error?

Not always possible or reasonable, but better than using a dummy
variable which causes warnings with other, more clueful, bootstrap
compilers. (I h̲a̲d̲ the problem with nice in mksh; I chose to ignore
that one warning.)

//mirabilos
--

-- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
(Continue reading)

Alt | 6 Aug 2009 01:01

Re: Update of cpp.

And likely you did. I'm getting the following error when I try to
compile pcc with pcc:

$ CC=gcc CFLAGS=-g ./configure
$ make all
$ sudo make install
$ make distclean
$ CC=pcc CFLAGS=-g ./configure
$ make all

cpp.c:1411: error: unterminated conditional

On Sat, Aug 1, 2009 at 9:00 AM, Anders Magnusson<ragge <at> ludd.ltu.se> wrote:
> I have done a significant cleanup of cpp, which both made it run
> much faster (in about 10% of the time before) and also fixed a set of
> bugs that has been around for a while.
>
> ...it also means that a number of new bugs probably are introduced :-/
>
> -- Ragge
>

Alt | 6 Aug 2009 01:29

Re: Update of cpp.

"Bootstrapping" is the word I wanted to use.

CentOS 5.3 i386 w/latest updates
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)

On Wed, Aug 5, 2009 at 4:01 PM, Alt<alt <at> altamiranus.info> wrote:
> And likely you did. I'm getting the following error when I try to
> compile pcc with pcc:
>
> $ CC=gcc CFLAGS=-g ./configure
> $ make all
> $ sudo make install
> $ make distclean
> $ CC=pcc CFLAGS=-g ./configure
> $ make all
>
> cpp.c:1411: error: unterminated conditional
>
>
>
> On Sat, Aug 1, 2009 at 9:00 AM, Anders Magnusson<ragge <at> ludd.ltu.se> wrote:
>> I have done a significant cleanup of cpp, which both made it run
>> much faster (in about 10% of the time before) and also fixed a set of
>> bugs that has been around for a while.
>>
>> ...it also means that a number of new bugs probably are introduced :-/
>>
>> -- Ragge
>>
>
(Continue reading)

Alt | 6 Aug 2009 07:55

pcc can't handle the double quote escape sequence

Try compiling:

#include <string.h>
#include <stdlib.h>

void test_func(char *s)
{
    strcpy(s, "[string \"]");
    /* comment here */
}

int main(void)
{
    char *s;
    s = malloc(2048);
    test_func(s);
    return 0;
}

I get the following errors:

test.c, line 7: syntax error
test.c, line 11: syntax error
test.c, line 15: warning: returning value from void function

But everything is copacetic if I remove the comment line, or if I
change the escape sequence to a single quote. Gcc compiles the program
above without issues.

My config: CentOS 5.3 i386 w/latest updates.
(Continue reading)

Alt | 6 Aug 2009 10:31

Re: pcc can't handle the double quote escape sequence

Repro on NetBSD 5.0 i386. Gcc is 4.1.3.

On Wed, Aug 5, 2009 at 10:55 PM, Alt<alt <at> altamiranus.info> wrote:
> Try compiling:
>
> #include <string.h>
> #include <stdlib.h>
>
> void test_func(char *s)
> {
>    strcpy(s, "[string \"]");
>    /* comment here */
> }
>
> int main(void)
> {
>    char *s;
>    s = malloc(2048);
>    test_func(s);
>    return 0;
> }
>
>
> I get the following errors:
>
> test.c, line 7: syntax error
> test.c, line 11: syntax error
> test.c, line 15: warning: returning value from void function
>
>
(Continue reading)

Anders Magnusson | 6 Aug 2009 12:35
Picon

Re: pcc can't handle the double quote escape sequence

Alt wrote:
> Try compiling:
>
> #include <string.h>
> #include <stdlib.h>
>
> void test_func(char *s)
> {
>     strcpy(s, "[string \"]");
>     /* comment here */
>   
Hm, it fails to strip that comment.  I'll look at it hopefully this evening.

-- Ragge

> }
>
> int main(void)
> {
>     char *s;
>     s = malloc(2048);
>     test_func(s);
>     return 0;
> }
>
>
> I get the following errors:
>
> test.c, line 7: syntax error
> test.c, line 11: syntax error
(Continue reading)

Alt | 6 Aug 2009 19:31

Re: Update of cpp.

Repros on NetBSD 5.0 i386.

On Wed, Aug 5, 2009 at 4:01 PM, Alt<alt <at> altamiranus.info> wrote:
> I'm getting the following error when I try to compile pcc with pcc:
>
> $ CC=gcc CFLAGS=-g ./configure
> $ make all
> $ sudo make install
> $ make distclean
> $ CC=pcc CFLAGS=-g ./configure
> $ make all
>
> cpp.c:1411: error: unterminated conditional
>
>
>
> On Sat, Aug 1, 2009 at 9:00 AM, Anders Magnusson<ragge <at> ludd.ltu.se> wrote:
>> I have done a significant cleanup of cpp, which both made it run
>> much faster (in about 10% of the time before) and also fixed a set of
>> bugs that has been around for a while.
>>
>> ...it also means that a number of new bugs probably are introduced :-/
>>
>> -- Ragge
>>
>


Gmane