Closed Bug 343680 Opened 20 years ago Closed 20 years ago

jsinterp.c warns too much

Categories

(Core :: JavaScript Engine, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: mrbkap, Assigned: mrbkap)

Details

Attachments

(1 file, 3 obsolete files)

Currently, when compiling jsinterp.c with -pedantic, there are hundreds upon hundreds of warnings by using GCC's __extension__ extension, we can shut these warnings up. There are two things to note: -- __extension__ doesn't appear to work in front of 'goto'. I get syntax errors. I was able to work around this by using |__extension__ ({goto foo;})| which is ugly, but appears to work. -- Since I was here, I decided to nuke the 'ISO C forbids conversion of object pointer to function pointer type' warning that we get casting to/from JSPropertyOp.
Attached patch Fix, v1 (obsolete) — Splinter Review
The JS_EXTENSION_STMT is so ugly, my eyes bleed, but it works...
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #228193 - Flags: review?(brendan)
Comment on attachment 228193 [details] [diff] [review] Fix, v1 How about JS_EXTENSION_ as the one-param macro's name, then? Reads better, still distinct from JS_EXTENSION as a keyword macro (barely, but who needs to see STMT to differentiate crap from crap :-P). /be
Attachment #228193 - Flags: review?(brendan) → review+
Attached patch Updated (obsolete) — Splinter Review
Attachment #228193 - Attachment is obsolete: true
Attachment #228331 - Flags: review?(brendan)
Comment on attachment 228331 [details] [diff] [review] Updated >- op = (JSOp) *pc; >- goto *normalJumpTable[op]; >+ DO_NEXT_OP(0); > > #else /* !JS_THREADED_INTERP */ Given that the code you changed to DO_NEXT_OP(0); is #ifdef JS_THREADED_INTERP, I'd rather preserve the explicit two lines that load op and do the goto (with the JS_EXTENSION_(...) of course). r=me with that and provided you tested the non-gcc case. /be
Attachment #228331 - Flags: review?(brendan) → review+
Attached patch With that fixed (obsolete) — Splinter Review
I'll get someone to test on Windows before checking in.
Attachment #228331 - Attachment is obsolete: true
Attachment #228335 - Flags: review+
Seth was nice enough to test my patch on Windows, this is updated to current trunk and actually compiles on Windows.
Attachment #228335 - Attachment is obsolete: true
Attachment #228338 - Flags: superreview?(sspitzer)
Attachment #228338 - Flags: review+
Comment on attachment 228338 [details] [diff] [review] Updated to trunk and compiling on Windows rs=sspitzer, I've built and smoke tested mrbkap's last patch on win32 / trunk.
Attachment #228338 - Flags: superreview?(sspitzer) → superreview+
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Priority: -- → P3
Resolution: --- → FIXED
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: