Updates:
        Status: WorkingAsIntended

Comment #1 on issue 2883 by [email protected]: Noisy embedder build with -Wunused-parameter
http://code.google.com/p/v8/issues/detail?id=2883

Seems like the compiler is having false positives:
- Passing a parameter to a virtual function that the default implementation does not use is perfectly fine. It might use it once overridden. For example
class Extension {
 public:
  virtual v8::Handle<v8::FunctionTemplate>
      GetNativeFunction(v8::Handle<v8::String> name) {
    return v8::Handle<v8::FunctionTemplate>();
  }
}

- Passing a parameter to a statically polymorphic function that it does not use is perfectly fine as well. The compiler uses the type of the parameter to choose the implementation. This makes sense especially in combination with templates. For example

static bool CanCastToHeapObject(void* o) { return false; }
static bool CanCastToHeapObject(Context* o) { return true; }
static bool CanCastToHeapObject(String* o) { return true; }
static bool CanCastToHeapObject(Object* o) { return true; }
static bool CanCastToHeapObject(Message* o) { return true; }
static bool CanCastToHeapObject(StackTrace* o) { return true; }
static bool CanCastToHeapObject(StackFrame* o) { return true; }

I suggest the embedder to add those ifdef lines before and after the v8.h include.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to