Closed Bug 358867 Opened 18 years ago Closed 18 years ago

Return value in a void function

Categories

(Core :: JavaScript Engine, defect)

x86
SunOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9alpha1

People

(Reporter: alfred.peng, Assigned: alfred.peng)

References

Details

(Keywords: verified1.8.1.1)

Attachments

(1 file)

There is a problem in the build process:
"jsapi.c", line 1805: void function cannot return value
cc: acomp failed for jsapi.c
gmake[1]: *** [jsapi.o] Error 2
Attached patch Patch v1Splinter Review
Assignee: general → alfred.peng
Status: NEW → ASSIGNED
Attachment #244180 - Flags: review?(brendan)
Comment on attachment 244180 [details] [diff] [review]
Patch v1

Igor, what compiler let this past?

/be
Attachment #244180 - Flags: review?(igor.bukanov)
Attachment #244180 - Flags: review?(brendan)
Attachment #244180 - Flags: review+
(In reply to comment #2)
> (From update of attachment 244180 [details] [diff] [review] [edit])
> Igor, what compiler let this past?

@callisto~/s> gcc -c -Wall -O3 -Wextra a.c
@callisto~/s> gcc -c -Wall -Wextra a.c
@callisto~/s> cat a.c
void f();

void g()
{
    return f();
}
@callisto~/s> gcc --version
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Comment on attachment 244180 [details] [diff] [review]
Patch v1

I underestimated the jet leg influence on my brain :(
Attachment #244180 - Flags: review?(igor.bukanov) → review+
From GCC mail list: the bug is fixed in GCC 4.2 and it is a valid C++ code.
Could anyone help me check in the patch? brendan?
mozilla/js/src/jsapi.c 	3.287
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
*** Bug 359038 has been marked as a duplicate of this bug. ***
Flags: in-testsuite-
Depends on: 357169
Blocks: 357169
No longer depends on: 357169
The committed patch for bug 357169 on 1.8.1 branch contained the fix.
Keywords: fixed1.8.1.1
Alfred:  Can you please help us verify this fix?  If you are able to successfully build now (which I'm assuming you are), please replace the "fixed1.8.1.1" keyword with "verified1.8.1.1".  Thanks!
Build successfully on my system: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1.1pre) Gecko/20061201 BonEcho/2.0.0.1pre.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: