This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug pch/13361] New: const wchar_t * strings not stored in pch
- From: "thomas dot francis at pkware dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2003 21:42:19 -0000
- Subject: [Bug pch/13361] New: const wchar_t * strings not stored in pch
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This is using gcc (GCC) 3.4 20031203 (experimental):
-------------
%cat test.hh
#include <stdio.h>
const char test_var2[] = "normal string";
const wchar_t test_var[] = L"wide string";
%cat test.cpp
#include "test.hh"
int main(int argc, char **argv)
{
printf("wide: %S\r\n", test_var);
printf("normal: %s\r\n", test_var2);
return 0;
}
-----
Create test.hh.gch using:
%g++ test.hh
Create testprog using:
%g++ -o testprog test.cc
The output of testprog is:
wide:
normal: normal string
If I remove test.hh.gch, and then recompile testprog, the output is:
wide: wide string
normal: normal string
--
Summary: const wchar_t * strings not stored in pch
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: pch
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: thomas dot francis at pkware dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: hppa2.0-hp-hpux10.20
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13361