Issue Details (XML | Word | Printable)

Key: PCC-297
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0
Operations

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

pointer to pointer to pointer to char fails to be passed, using -xtemps

Created: 08/Apr/11 08:36 AM   Updated: 11/Apr/11 07:33 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386


 Description  « Hide
the following code fragment:

void foo(char ***v);

void bar(char **v)
{
        foo(&v);
}

when compiled with "-Wc,-xtemps" fails, producing an error:

line 0: compiler error: stkarg: bad arg

(without the -xtemps it seems to be ok)


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Iain Hibbert added a comment - 08/Apr/11 08:46 AM
In fact its worse than that; taking the address of anything fails with "bad stkarg" as illustrated by the following example

char *bar(char v)
{
        return &v;
}

(this is a regression introduced by the removal of MKSUE etc..)

Anders Magnusson added a comment - 11/Apr/11 07:33 PM
Should be fixed now.