- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://bugzilla.mozilla.org/show_bug.cgi?id=784309
What this occurs with: Intel C++ Compiler 13 Beta 2
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks,
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody,
Please take a look at isolated test-case for one error ( on a line 355 in a header provided by Alex ).
Unfortunately, some pieces of codes in the test-case are commented out because I decided to stop brining new components.
Every time when I was adding a new declaration it was needed some new dependent declaration(s).
I tested the test-case with 5 different C++ compilers and only two ( MSC & MinGW ) successfully compiled it.
[cpp]template< typename IntegerType > struct IsSupportedPass2 { static const bool value = false; }; template< typename IntegerType > struct IsSupported { static const bool value = IsSupportedPass2< IntegerType >::value; }; template< size_t Size, bool Signedness > struct StdintTypeForSizeAndSignedness {}; template<> struct StdintTypeForSizeAndSignedness< 1, true > { typedef __int8 Type; }; template<> struct StdintTypeForSizeAndSignedness< 1, false > { typedef unsigned __int8 Type; }; template<> struct StdintTypeForSizeAndSignedness< 2, true > { typedef __int16 Type; }; template<> struct StdintTypeForSizeAndSignedness< 2, false > { typedef unsigned __int16 Type; }; template<> struct StdintTypeForSizeAndSignedness< 4, true > { typedef __int32 Type; }; template<> struct StdintTypeForSizeAndSignedness< 4, false > { typedef unsigned __int32 Type; }; template<> struct StdintTypeForSizeAndSignedness< 8, true > { typedef __int64 Type; }; template<> struct StdintTypeForSizeAndSignedness< 8, false > { typedef unsigned __int64 Type; }; template< typename IntegerType > struct IsSigned { static const bool value = IntegerType(-1) <= IntegerType(0); // static const bool value = false; // static const bool value = true; }; template< typename IntegerType, size_t Size = sizeof( IntegerType ) > struct TwiceBiggerType { typedef typename StdintTypeForSizeAndSignedness< sizeof( IntegerType ) * 2, IsSigned< IntegerType >::value >::Type Type; }; template< typename T, bool IsSigned = IsSigned< T >::value, bool TwiceBiggerTypeIsSupported = IsSupported< typename TwiceBiggerType< T >::Type >::value > struct IsMulValidImpl{}; template< typename T, bool IsSigned > struct IsMulValidImpl< T, IsSigned, true > { static bool run( T x, T y ) { // typedef typename TwiceBiggerType< T >::Type TwiceBiggerType; // TwiceBiggerType product = TwiceBiggerType( x ) * TwiceBiggerType( y ); // return IsInRange< T >( product ); return ( bool )true; } }; template< typename T > struct IsMulValidImpl< T, true, false > { static bool run( T x, T y ) { // const T max = MaxValue< T >::value; // const T min = MinValue< T >::value; // // if( x == 0 || y == 0 ) // return true; // // if( x > 0 ) // { // return y > 0 ? x <= max / y : y >= min / x; // } // // // If we reach this point, we know that x < 0 // return y > 0 ? x >= min / y : y >= max / x; return ( bool )true; } }; template< typename T > struct IsMulValidImpl< T, false, false > { static bool run( T x, T y ) { // return y == 0 || x <= MaxValue< T >::value / y; return ( bool )true; } }; template< typename T > inline bool IsMulValid( T x, T y ) { return IsMulValidImpl< T >::run( x, y ); } void main( void ) { IsSupportedPass2< __int32 > isp2; IsSupported< __int32 > is; StdintTypeForSizeAndSignedness< sizeof( __int32 ), true > stfsas; StdintTypeForSizeAndSignedness< 1, true > int8type; StdintTypeForSizeAndSignedness< 1, false > uint8type; StdintTypeForSizeAndSignedness< 2, true > int16type; StdintTypeForSizeAndSignedness< 2, false > uint16type; StdintTypeForSizeAndSignedness< 4, true > int32type; StdintTypeForSizeAndSignedness< 4, false > uint32type; StdintTypeForSizeAndSignedness< 8, true > int64type; StdintTypeForSizeAndSignedness< 8, false > uint64type; IsSigned< __int8 > isInt8; TwiceBiggerType< __int8, sizeof( __int8 ) > tbt; IsMulValidImpl< __int8, false, false > imviInt8; IsMulValidImpl< unsigned __int8, true, false > imviUInt8; IsMulValidImpl< __int16, false, false > imviInt16; IsMulValidImpl< unsigned __int16, true, false > imviUInt16; } [/cpp]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here are a couple of comments:
- There are ~10 compilation errors and I've spent ~1 hour to create an isolated test-case just for one error
- I can see that FireFox software developers are using latest C++ features of a GCC C++ compiler ( Is that correct? ) and
that is why Intel C++ compiler fails to compile some sources ( I agree that this is not good )
- You need to isolate as many as possible compilation errors in test-cases and it will help Intel software developers
to fix these errors ( You're working on that project for some time already and you have really interesting
problems )
- I don't know if Intel C++ software developers will be able to look at the latest version of FireFox project ( It would be nice if they look )
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page