Issue Details (XML | Word | Printable)

Key: PCC-293
Type: Bug Bug
Status: Closed Closed
Resolution: Incomplete
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Richard Spencer
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Lack of pragma support causing build failures (Cross-compiler Win32)

Created: 03/Apr/11 06:48 PM   Updated: 25/May/14 05:35 AM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. Text File hellowin.c (3 kB)

Environment: Linux Fedora 11/binutils 2.21/--target=i386-pe

 Description  « Hide
I've raised this as a new issue rather than requesting reopening of PCC-276 since this issue highlights a new area of pcc being a problem. The additions to the wiki page at may assist in relation to this issue.

The cross-compiler executable '/usr/local/bin/i386-pe-pcc' fails to build pcc-libs at file ssp.c with Assembler error: unknown pseudo-op: `.previous'. The reason I hesitate to call this a backend issue is because of the lines:

#define __constructor _Pragma("init")
#define __destructor _Pragma("fini")

which seem to cause the problem. However I'm not qualified to judge that.

With the mingw32 and w32api packages it is the header files which fail to compile with pcc saying "bad argument to #pragma" many times before giving up.

I attach a .c file which currently fails to compile but which may well work if pcc can be made to support the pragma's in the support libraries. (It is a very slightly altered version of Compile with "i386-pe-pcc -o /tmp/hellowin.exe /tmp/hellowin.c -lgdi32".)

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Richard Spencer added a comment - 08/Dec/11 06:44 PM
Same issue with latest win32 native port pcc-20111206-win32.exe from and above test file.

"bad argument to #pragma" in winnt.h, pshpack4.h, poppack.h, wingdi.h and winuser.h

Is pragma support planned? If not then maybe list this one as a known bug and close this report. Thanks.

Gregory McGarry added a comment - 11/Dec/11 11:05 PM
#pragma pack() is not supported at the moment.

But I have an idea how it may be possible to add support for it.

Anders Magnusson added a comment - 02/May/14 12:32 PM
The first bug above seems to be the assembler; not pcc.
The second addressed seems to be lack of pragma pack(), which is supported these days.
Are there more issues involved or can the ticket be closed?

Anders Magnusson added a comment - 25/May/14 05:35 AM
No response, file a new ticket if still a problem.