-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.5.0 Alpha
-
None
-
GCC 5 on Fedora Rawhide
gen/blink/bindings/core/v8/V8NodeFilter.cpp:93:5: error: narrowing conversion of ‘4294967295u’ from ‘unsigned int’ to ‘int’ inside { }
static const V8DOMConfiguration::ConstantConfiguration V8NodeFilterConstants[] = {
{"FILTER_ACCEPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
{"FILTER_REJECT", 2, 0, 0, V8DOMConfiguration::ConstantTypeShort},
{"FILTER_SKIP", 3, 0, 0, V8DOMConfiguration::ConstantTypeShort},
{"SHOW_ALL", 0xFFFFFFFF, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_ELEMENT", 0x00000001, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_ATTRIBUTE", 0x00000002, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_TEXT", 0x00000004, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_CDATA_SECTION", 0x00000008, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_ENTITY_REFERENCE", 0x00000010, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_ENTITY", 0x00000020, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_PROCESSING_INSTRUCTION", 0x00000040, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_COMMENT", 0x00000080, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_DOCUMENT", 0x00000100, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_DOCUMENT_TYPE", 0x00000200, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_DOCUMENT_FRAGMENT", 0x00000400, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
{"SHOW_NOTATION", 0x00000800, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
};
IRC log:
<thiago> 0xFFFFFFFF is the problem
<thiago> that's not an int, it's an unsigned
<thiago> it's a bug in the generator, please report it
<thiago> struct S { const char *name; int value; }; S s = {"SHOW_ALL", 0xFFFFFFFF };
<thiago> GCC 4.9: warning: narrowing conversion of ‘4294967295u’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing]
<thiago> ICC 15: nothing
<thiago> GCC 5: error: narrowing conversion of ‘4294967295u’ from ‘unsigned int’ to ‘int’ inside { }
<thiago> Clang 3.6: error: constant expression evaluates to 4294967295 which cannot be narrowed to type 'int' [-Wc++11-narrowing]
- is duplicated by
-
QTBUG-45761 Can not be compiled wuth gcc-5.10
-
- Closed
-