g++ treats returned string literal as const char pointer not const char array

前端 未结 2 717
别那么骄傲
别那么骄傲 2020-12-09 18:52

I\'m seeing some odd behaviour when returning a string literal from a function that should perform an implicit conversion with g++ (version 4.7.3). Can anyone explain why t

2条回答
  •  有刺的猬
    2020-12-09 19:03

    It appears that this is a bug affecting several versions of gcc which has been reported over and over again, most recently about a month ago against the most recent version, 4.8.2. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24666

提交回复
热议问题