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

List:       pcc-list
Subject:    Re: [Pcc] pcc can't compile preprocessed file by itself
From:       Anders Magnusson <ragge () ludd ! ltu ! se>
Date:       2022-11-21 19:12:55
Message-ID: f825d050-0df2-3b6b-8645-c3f876af0009 () ludd ! ltu ! se
[Download RAW message or body]

Hi,

you should name the preprocessed file copper.i   (by tradition...).
Otherwise it will feed control information back to cpp, which will 
scramble the output.

-- R

Den 2022-11-21 kl. 14:54, skrev Domingo Alvarez Duarte:
> While testing pcc with "cooper.c" (see attached) I'm getting several 
> errors:
>
> ====
>
> pcc -I. -c copper.c
> copper.c, line 12: operands of CAST have incompatible types
> copper.c, line 13: operands of CAST have incompatible types
> copper.c, line 22: operands of CAST have incompatible types
> copper.c, line 24: operands of CAST have incompatible types
> copper.c, line 26: operands of CAST have incompatible types
> copper.c, line 28: operands of CAST have incompatible types
> copper.c, line 30: operands of CAST have incompatible types
> copper.c, line 37: operands of CAST have incompatible types
> copper.c, line 38: operands of CAST have incompatible types
> copper.c, line 39: operands of CAST have incompatible types
> copper.c, line 40: operands of CAST have incompatible types
> copper.c, line 42: operands of CAST have incompatible types
> copper.c, line 43: operands of CAST have incompatible types
> copper.c, line 45: operands of CAST have incompatible types
> copper.c, line 58: operands of CAST have incompatible types
> copper.c, line 60: operands of CAST have incompatible types
> copper.c, line 62: operands of CAST have incompatible types
> copper.c, line 64: operands of CAST have incompatible types
> copper.c, line 66: operands of CAST have incompatible types
> copper.c, line 68: operands of CAST have incompatible types
> copper.c, line 70: operands of CAST have incompatible types
> copper.c, line 72: operands of CAST have incompatible types
> copper.c, line 74: operands of CAST have incompatible types
> copper.c, line 81: operands of CAST have incompatible types
> copper.c, line 82: operands of CAST have incompatible types
> copper.c, line 84: operands of CAST have incompatible types
> copper.c, line 85: operands of CAST have incompatible types
> copper.c, line 93: operands of CAST have incompatible types
> copper.c, line 94: operands of CAST have incompatible types
> copper.c, line 96: operands of CAST have incompatible types
> copper.c, line 104: operands of CAST have incompatible types
> copper.c, line 104: compiler error: too many errors
> error: pcc-cvs/libexec/ccom terminated with status 1
>
> ====
>
> Then I preprocessed it and then I'm getting this strange errors:
>
> ====
>
> pcc -I. -E copper.c > copper-pcc.pp.c
> $ pcc-env pcc -c copper-pcc.pp.c
> copper-pcc.pp.c, line 2: syntax error
> copper-pcc.pp.c, line 91: syntax error
> copper-pcc.pp.c, line 167: syntax error
> copper-pcc.pp.c, line 188: syntax error
> copper-pcc.pp.c, line 201: syntax error
> copper-pcc.pp.c, line 224: syntax error
> copper-pcc.pp.c, line 243: syntax error
> copper-pcc.pp.c, line 248: syntax error
> copper-pcc.pp.c, line 251: syntax error
> copper-pcc.pp.c, line 260: syntax error
> copper-pcc.pp.c, line 271: syntax error
> copper-pcc.pp.c, line 295: syntax error
> copper-pcc.pp.c, line 317: syntax error
> copper-pcc.pp.c, line 331: syntax error
> copper-pcc.pp.c, line 341: syntax error
> copper-pcc.pp.c, line 371: syntax error
> copper-pcc.pp.c, line 387: syntax error
> copper-pcc.pp.c, line 395: syntax error
> copper-pcc.pp.c, line 418: syntax error
> copper-pcc.pp.c, line 429: syntax error
> copper-pcc.pp.c, line 507: syntax error
> copper-pcc.pp.c, line 508: function illegal in structure or union
> copper-pcc.pp.c, line 517: function illegal in structure or union
> copper-pcc.pp.c, line 525: function illegal in structure or union
> copper-pcc.pp.c, line 528: function illegal in structure or union
> copper-pcc.pp.c, line 529: syntax error
> copper-pcc.pp.c, line 530: function illegal in structure or union
> copper-pcc.pp.c, line 531: function illegal in structure or union
> copper-pcc.pp.c, line 532: function illegal in structure or union
> copper-pcc.pp.c, line 533: syntax error
> copper-pcc.pp.c, line 534: function illegal in structure or union
> copper-pcc.pp.c, line 534: compiler error: too many errors
> error: pcc-cvs/libexec/ccom terminated with status 1
>
> ====
>
> Here is "copper-pcc.pp.c, line 2: syntax error"
>
> ====
>
> # 1 "copper.c"
>
> ====
>
> Notice that I'm not asking for why it's showing errors in "copper.c" 
> (although gcc does compile it fine) but why the errors in 
> "copper-pcc.pp.c" are like pcc cant recognize it's own preprocessed 
> files.
>
>
> Cheers !
>
> _______________________________________________
> Pcc mailing list
> Pcc@lists.ludd.ltu.se
> https://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc

_______________________________________________
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