Re: C++ Issue with const char * on strchr

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

 



Jochen Schmitt wrote:

> I have a odd issue with the current g++ 4.4 release on rawhide.
> 
> If I try to pass a string declared as const char * in a c++ programm
> to the
> strchr function, I will get an error message which tell me, that a
> conversation
> from const char * to char * is not valid.
> 
> Because this doesn't happens on older releases of g++, I want to as:
> Is this a bug or a feature?

In include/c++/4.4.0/cstring you should see:

  inline char*
  strchr(char* __s1, int __n)
  { return __builtin_strchr(const_cast<const char*>(__s1), __n); }

I wonder if you have not included the correct header.

Andrew.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux