This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug pch/13361] New: const wchar_t * strings not stored in pch


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]