swig
swig copied to clipboard
JSCore backend doesn't look C89 clean
I've been visually looking at the JSCore output. I don't think it is C89 clean.
For example, I see the use of "bool" as a type which is not standard in C89. And I'm seeing some places where variables are not declared at the top of the scope. (I think SWIG_JSC_NewPointerObj is an example of this.)
This will be a problem for the antiquated Visual Studio C compiler.
You are right... I was not careful here. Would you like to fix it?
@ewmailing Do u consider this done or should we keep this open?
Keep this open for now unless you there was a serious push to clean these all up. What I committed so far was what I saw casually while fixing other problems.
I'm still transitioning to the latest tip. The rebase that happened 6-12 months ago reallly messed us up because we had our own internal multiple branches we were using/fixing things in, and after the rebase, we discovered a lot of regressions so we couldn't merge/switch. (Most of those other fixes I recently submitted were manual transplants we had already fixed in our internal branches a long time ago.)
I'm finally moving things over to the latest (and hoping there will be no rebases), but my initial push is all on Mac/clang (since it has a built-in JSCore), which by default doesn't care about C89.
But a month ago, I was on Windows/Visual Studio, and remember hitting more problems. So I'm anticipating those are still there unless somebody else cleaned them up. I hope to be far enough long to cycle back to Windows/Visual Studio in a couple more weeks.
Also, a quick note, I'm currently not doing any v8 stuff, so I don't know how that looks.