Closed Bug 218551 Opened 21 years ago Closed 21 years ago

Mozilla does not compile with gcc 3.4 cvs build (pedantic semicolon problem)

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

References

Details

Attachments

(1 file)

In cvs versions of gcc (what will be 3.4), extra semicolons at the top level are
now rejected as errors.  I have a patch which removes all of these that I could
find (a lot of these were scripted search-and-replace).
Attached patch patchSplinter Review
I'll just call out the non-trivial parts of the patch:

I fixed the ctl makefile to make sure dist/lib is first in the library path. 
Otherwise, you get link warnings if you have an older libxpcom in /usr/lib.

In a couple of places in mailnews, I had to replace a static_cast of a
nsFileSpec to an nsFilePath with explicit construction of a nsFilePath from the
nsFileSpec.  I believe this is what was happening anyway, since there is no
other relationship between the two classes.
Comment on attachment 131018 [details] [diff] [review]
patch

dbaron, can you r/sr or rubber-stamp me?
Attachment #131018 - Flags: review?(dbaron)
hm... this is a duplicate of bug 217265... but both bugs have patches.
> In a couple of places in mailnews, I had to replace a static_cast of a
> nsFileSpec to an nsFilePath with explicit construction of a nsFilePath from the
> nsFileSpec.  I believe this is what was happening anyway, since there is no
> other relationship between the two classes.

What error did gcc give there?

r+sr=dbaron (mostly rubber-stamp) on the whole thing (I think the construction
is clearer, but I think the static cast should work)

I think it would be good to get this in for 1.5 to reduce the compilation bugs
we get about it.
Attachment #131018 - Flags: superreview+
Attachment #131018 - Flags: review?(dbaron)
Attachment #131018 - Flags: review+
Attachment #131018 - Flags: approval1.5?
Comment on attachment 131018 [details] [diff] [review]
patch

Agreed, let's get this in for 1.5final.

/be
Attachment #131018 - Flags: approval1.5? → approval1.5+
I really did search for a dup, but forgot to search on unconfirmed bugs.

The error given without the nsFilePath patch is:

nsNewsFolder.cpp: In member function `nsresult
nsMsgNewsFolder::AddDirectorySeparator(nsFileSpec&)':
nsNewsFolder.cpp:319: error: invalid use of void expression

The error message seems kind of bogus to me.
*** Bug 217265 has been marked as a duplicate of this bug. ***
checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
For reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12479

This gcc problem still causes build problems - Red Hat Linux 8.0
system headers have this problem.
Summary: Mozilla does not compile with gcc 3.4 cvs build → Mozilla does not compile with gcc 3.4 cvs build (pedantic semicolon problem)
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: