[ 
https://issues.apache.org/jira/browse/LOGCXX-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775010#comment-16775010
 ] 

Thorsten Schöning commented on LOGCXX-400:
------------------------------------------

CASTing itself doesn't seem to be entirely wrong as well:

{quote}G++ 4.6 gave an error but it was changed to a warning intentionally for 
4.7 because many people (myself included) found that narrowing conversions 
where one of the most commonly encountered problems when trying to compile 
large C++03 codebases as C++11.  Previously well-formed code such as char c[] = 
{ i, 0 }; (where i will only ever be within the range of char) caused errors 
and had to be changed to char c[] = { (char)i, 0 }{quote}

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783#c4

> C++11 does not allow char literals with highest bit set unless cast
> -------------------------------------------------------------------
>
>                 Key: LOGCXX-400
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-400
>             Project: Log4cxx
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>         Environment: XCode 4.5, clang set to C++11
>            Reporter: Andrew Lazarus
>            Assignee: Thorsten Schöning
>            Priority: Major
>             Fix For: 0.11.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> C++11 has tighter rules for widening of literals. In particular, 0xFF (for 
> example) is an unsigned short unless cast otherwise.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to