Re: deprecated conversion from string constant to 'char *'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Derek Atkins <warlord@xxxxxxx> writes:

> typedef char* PDFFileName;
> typedef const char* PDFFileNameConst;
> 
> class Foo
> {
> public:
>   // If you change this to PDFFileNameConst then the warning goes away
>   static int Blah(const PDFFileName name);
> };
> 
> int do_test()
> {
>   return Foo::Blah("bzz");
> }

This is expected behaviour.  "const PDFFileName" is not "const char*",
it is "char* const".

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux