https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60591

Jonny Grant <jg at jguk dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jg at jguk dot org

--- Comment #3 from Jonny Grant <jg at jguk dot org> ---
Clang++ gives a signedness conversion warning that g++ doesn't for C++ code.


#1 with x86-64 clang (trunk)
<source>:4:22: warning: implicit conversion changes signedness: 'things' to
'unsigned int' [-Wsign-conversion]
    unsigned int i = thing;
                 ~   ^~~~~
1 warning generated.
Compiler returned: 0

enum things { thing=-1 };       //< declaration of a constant of type int
int main()
{
    unsigned int i = thing;
    return (int)i;
}

Reply via email to