John is an object complement here.
http://grammar.ccc.commnet.edu/grammar/objects.htm
In the sentence
They named him John.
what sort of complement is "John"? The direct object is "him".
How does this relate to a sentence like
They made him do it.
1 answer