Issue Details (XML | Word | Printable)

Key: PCC-95
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Gregory McGarry
Votes: 1
Watchers: 0

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

bogus warning for wchar_t assignment

Created: 10/Sep/09 01:57 AM   Updated: 25/Sep/10 10:28 AM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

OSX/i386, NetBSD/i386

 Description  « Hide
The following fragment will issue a bogus warning.

$ pcc -Wall -DWIDE wchar.c
wchar.c, line 15: warning: illegal pointer combination

#include <stdio.h>
#include <wchar.h>

#ifdef WIDE
#define CHAR_T wchar_t
#define _T(x) L ## x
#define CHAR_T char
#define _T(x) x

int main()
const CHAR_T *str = _T("string");

return 0;

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Gregory McGarry added a comment - 10/Sep/09 02:00 AM
This issue seems to be the only problem with building libc on NetBSD.

Iain Hibbert added a comment - 22/Apr/10 10:17 AM
I think this may have been fixed by the following commit

which changed the default type of wide strings to be int rather than unsigned.

Altamiranus added a comment - 24/Sep/10 06:58 PM
I verified that the bug does not repro in NetBSD 5.0.x i386.

Anders Magnusson added a comment - 25/Sep/10 10:28 AM
Bug seems to be fixed now as reported after testing by Alt.