Issue Details (XML | Word | Printable)

Key: PCC-349
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Nicolas Joly
Votes: 0
Watchers: 0

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

ccom crash with unknown struct within struct

Created: 11/May/11 12:34 AM   Updated: 11/May/11 10:13 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

NetBSD petaure.lan 5.99.51 NetBSD 5.99.51 (PETAURE) #16: Sun May 8 22:56:08 CEST 2011 njoly@petaure.lan:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/PETAURE amd64
pcc 1.1.0.DEVEL 20110510 for x86_64-unknown-netbsd5.99.51, njoly@petaure.lan

 Description  « Hide
The following sample code, with an unknown struct within a struct, make ccom crash.

njoly@petaure [~]> cat foo.c
struct { char c; struct unknown u; } s;
int main() { return 0; }
njoly@petaure [~]> ls -l *.core
zsh: no matches found: *.core
njoly@petaure [~]> pcc -o /dev/null foo.c; echo $?
njoly@petaure [~]> ls -l *.core
-rw------- 1 njoly users 164200 May 11 00:27 ccom.core

njoly@petaure [~]> gcc -o /dev/null foo.c; echo $?
foo.c:1: error: field 'u' has incomplete type

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 11/May/11 10:13 PM
Same fix as PCC-345.