Closed Bug 363592 Opened 18 years ago Closed 17 years ago

GCC build errors in nsImageWin.h and nsImageWin.cpp

Categories

(Core Graveyard :: GFX: Win32, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha6

People

(Reporter: nivoside, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: fixed1.8.0.13, fixed1.8.1.5, regression)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.8) Gecko/20061105 Firefox/1.5.0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.8) Gecko/20061105 Firefox/1.5.0.8 The patch of Bug 329299 seems to build with MinGW fail. The same problem also on MOZILLA_1_8_BRANCH is caused though it is a record when failing in MOZILLA_1_8_0_BRANCH. m:/mozilla/gfx/src/windows/nsImageWin.h: In constructor `nsImageWin::nsImageWin()': m:/mozilla/gfx/src/windows/nsImageWin.h:289: warning: `nsImageWin::mHBitmap' will be initialized after m:/mozilla/gfx/src/windows/nsImageWin.h:285: warning: `PRUint8*nsImageWin::mAlphaBits' m:/mozilla/gfx/src/windows/nsImageWin.cpp:98: warning: when initialized here m:/mozilla/gfx/src/windows/nsImageWin.h:285: warning: `nsImageWin::mAlphaBits' will be initialized after m:/mozilla/gfx/src/windows/nsImageWin.h:277: warning: `nsColorMap*nsImageWin::mColorMap' m:/mozilla/gfx/src/windows/nsImageWin.cpp:98: warning: when initialized here m:/mozilla/gfx/src/windows/nsImageWin.h:290: warning: `nsImageWin::mBHead' will be initialized after m:/mozilla/gfx/src/windows/nsImageWin.h:270: warning: `PRPackedBool nsImageWin::mDIBTemp' m:/mozilla/gfx/src/windows/nsImageWin.cpp:98: warning: when initialized here m:/mozilla/gfx/src/windows/nsImageWin.h:275: warning: `nsImageWin::mRowBytes' will be initialized after m:/mozilla/gfx/src/windows/nsImageWin.h:268: warning: `PRPackedBool nsImageWin::mIsOptimized' m:/mozilla/gfx/src/windows/nsImageWin.cpp:98: warning: when initialized here m:/mozilla/gfx/src/windows/nsImageWin.h:282: warning: `nsImageWin::mDecodedY2' will be initialized after m:/mozilla/gfx/src/windows/nsImageWin.h:269: warning: `PRPackedBool nsImageWin::mIsLocked' m:/mozilla/gfx/src/windows/nsImageWin.cpp:98: warning: when initialized here m:/mozilla/gfx/src/windows/nsImageWin.h:288: warning: `nsImageWin::mImageCache' will be initialized after m:/mozilla/gfx/src/windows/nsImageWin.h:266: warning: `PRPackedBool nsImageWin::mInitialized' m:/mozilla/gfx/src/windows/nsImageWin.cpp:98: warning: when initialized here m:/mozilla/gfx/src/windows/nsImageWin.h:294: warning: `nsImageWin::mTimer' will be initialized after m:/mozilla/gfx/src/windows/nsImageWin.h:271: warning: `PRPackedBool nsImageWin::mImagePreMultiplied' m:/mozilla/gfx/src/windows/nsImageWin.cpp:98: warning: when initialized here m:/mozilla/gfx/src/windows/nsImageWin.cpp: In member function `virtual nsresult nsImageWin::DrawTile(nsIRender ingContext&, nsIDrawingSurface*, PRInt32, PRInt32, PRInt32, PRInt32, const nsRect&)': m:/mozilla/gfx/src/windows/nsImageWin.cpp:979: warning: converting to `PRInt32' from `float' m:/mozilla/gfx/src/windows/nsImageWin.cpp:980: warning: converting to `PRInt32' from `float' m:/mozilla/gfx/src/windows/nsImageWin.cpp: In function `void CompositeBitsInMemory(HDC__*, int, int, int, int, int, int, int, int, PRInt32, PRUint8*, MONOBITMAPINFO*, PRUint8*, tagBITMAPINFOHEADER*, PRInt16)': m:/mozilla/gfx/src/windows/nsImageWin.cpp:2044: error: `__try' undeclared (first use this function) m:/mozilla/gfx/src/windows/nsImageWin.cpp:2044: error: (Each undeclared identifier is reported only once for e ach function it appears in.) m:/mozilla/gfx/src/windows/nsImageWin.cpp:2044: error: expected `;' before '{' token m:/mozilla/gfx/src/windows/nsImageWin.cpp:2050: error: `__except' undeclared (first use this function) m:/mozilla/gfx/src/windows/nsImageWin.cpp:2050: error: expected `;' before '{' token make[5]: *** [nsImageWin.o] Error 1 make[5]: Leaving directory `/cygdrive/m/mozilla/obj-i686-pc-cygwin/gfx/src/windows' make[4]: *** [libs] Error 2 make[4]: Leaving directory `/cygdrive/m/mozilla/obj-i686-pc-cygwin/gfx/src' make[3]: *** [libs] Error 2 make[3]: Leaving directory `/cygdrive/m/mozilla/obj-i686-pc-cygwin/gfx' make[2]: *** [tier_9] Error 2 make[2]: Leaving directory `/cygdrive/m/mozilla/obj-i686-pc-cygwin' make[1]: *** [alldep] Error 2 make[1]: Leaving directory `/cygdrive/m/mozilla/obj-i686-pc-cygwin' make: *** [alldep] Error 2 The comment that remains in Bonsai is wrong. I believe that the patch of Bug 329299 is a cause in this. Reproducible: Always Steps to Reproduce: 1.The source is downloaded. 2.Build is started. 3.The error is reported. Actual Results: Build fails. Expected Results: It enjoys Firefox of the latest version in the family. When trying by the following versions, the published error log is the one. binutils 20050610-1 gcc 3.3.3-3 gcc-core 3.3.3-3 gcc-g++ 3.3.3-3 gcc-mingw-core 20040810-1 gcc-mingw-g++ 20040810-1 make 3.80-1 mingw-runtime 3.10-1 w32api 3.7-1 Even if "Current" that mingw.org distributes is used, it is confirmed to fail.
Blocks: mingw
Summary: MinGW build error due to Bug #329299 → Mingw build errors in nsImageWin.h and nsImageWin.cpp
I've been building succesfully (with other build problems, though) current trunk builds, using mingw, is this still an issue?
Hmm, yeah, I'm seeing it now too, only with a 1.8.1 branch build, not with trunk. Not sure why the difference between trunk and branch.
Blocks: 329299
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #2) > Not sure why the difference between trunk and branch. You build gfx/src/thebes on trunk and not gfx/src/windows?
Assignee: printing → win32
Component: Printing → GFX: Win32
Keywords: regression
QA Contact: ian
Summary: Mingw build errors in nsImageWin.h and nsImageWin.cpp → GCC build errors in nsImageWin.h and nsImageWin.cpp
(In reply to comment #3) > > Not sure why the difference between trunk and branch. > You build gfx/src/thebes on trunk and not gfx/src/windows? Ah, heh, yeah, that's the reason.
I guess we can put it in an #ifdef for MSVC?
A similar bug in another project (http://bugs.miranda-im.org/view.php?id=1553) was resolved with: #define __try #define __except(x) if (0) /* don't execute handler */ #define __finally #define _try __try #define _except __except #define _finally __finally In some central location. Where should we do this for GCC and with what #ifdef?
Nice trick, but it makes the code obscure IMO. Unless you know about these #defines beforehand there is no way of knowing that the code will do different things depending on which compiler you use. Since this is the only place so far I would just #ifdef it in-place. Just my 2 cents...
Attachment #266471 - Flags: superreview?(benjamin)
Attachment #266471 - Flags: review+
Comment on attachment 266471 [details] [diff] [review] Wrap it in #ifdef _MSC_VER shiver
Attachment #266471 - Flags: superreview?(benjamin) → superreview+
Assignee: win32 → mats.palmgren
Checked in to trunk at 2007-06-08 05:05 PDT. -> FIXED
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attachment #266471 - Flags: approval1.8.1.5?
Attachment #266471 - Flags: approval1.8.0.13?
Target Milestone: --- → mozilla1.9alpha6
Comment on attachment 266471 [details] [diff] [review] Wrap it in #ifdef _MSC_VER approved for 1.8.1.5 and 1.8.0.13, a=dveditz for release-drivers
Attachment #266471 - Flags: approval1.8.1.5?
Attachment #266471 - Flags: approval1.8.1.5+
Attachment #266471 - Flags: approval1.8.0.13?
Attachment #266471 - Flags: approval1.8.0.13+
Checked in to MOZILLA_1_8_BRANCH: /cvsroot/mozilla/gfx/src/windows/nsImageWin.cpp,v: 3.149.6.3 Checked in to MOZILLA_1_8_0_BRANCH: /cvsroot/mozilla/gfx/src/windows/nsImageWin.cpp,v: 3.149.14.2
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: