[prev in list] [next in list] [prev in thread] [next in thread]
List: pcc-list
Subject: Re: [Pcc] compiler error: stmtfree: usdnodes 1
From: Iain Hibbert <plunky () ogmig ! net>
Date: 2015-09-01 19:59:08
Message-ID: alpine.NEB.2.11.1509012052080.1765 () galant ! ogmig ! net
[Download RAW message or body]
On Tue, 1 Sep 2015, Rich Felker wrote:
> On Tue, Sep 01, 2015 at 06:26:28PM +0200, Anders Magnusson wrote:
> > Den 2015-09-01 kl. 12:33, skrev Iain Hibbert:
> > >>The node free checking after a statement failed because one node
> > >>was allocated to "int", and yacc fetches it before the free check to
> > >>see if it is followed by else.
> > >and perhaps not so interesting, but the similar construct
> > >
> > >void foo(int a)
> > >{
> > > if (a == 0)
> > > ;
> > >
> > > 1;
> > >}
> > >
> > >does still fail with the same error ..
> > >
> > Yep, I know. Fortunately that type of statement makes no sense, so
> > I have left it for now.
> > I'll fix it in the future.
>
> It could easily arise via the preprocessor, e.g. for:
>
> if (a == 0);
> MACRO1();
> MACRO2();
>
> where MACRO1 is defined to nothing at all for some configurations and
> MACRO2 is something that returns 1 on failure and is defined to
> always-fail on some configurations.
Indeed, that example originated more or less like that in GNU diff. A
macro was used to remove a function call where not necessary for some
systems
iain
_______________________________________________
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