Issue Details (XML | Word | Printable)

Key: PCC-81
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Daniel Dickman
Votes: 1
Watchers: 1

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

compiler error on amd64

Created: 19/Aug/09 05:56 AM   Updated: 02/Oct/10 12:25 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

[/usr/src/usr.bin/sort] uname -msrvp
OpenBSD 4.6 GENERIC.MP#130 amd64 Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz

 Description  « Hide
[/usr/src/usr.bin/sort] pcc -O2 -pipe -c append.c
append.c, line 154: compiler error: FIXME: classify

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Altamiranus added a comment - 20/Sep/10 10:41 PM
pcc doesn't know how to pass-by-value unions. Passing unions by reference (using pointers) works fine.

The following snippet duplicates the error:

--- cut here --- cut here ---
#include <stdio.h>
#include <string.h>

union u {
   int n;
   void *vp;
   char sz[16];

int print_s(union u uv)
        return 0;

int main(void)
union u zz;

    printf("sizeof(union u) = %d\n", sizeof(union u));
    strcpy(, "string");
    return 0;
--- cut here --- cut here ---

Anders Magnusson added a comment - 02/Oct/10 12:25 PM