r251738 - [MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibility

James Dennett via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 1 00:01:11 PDT 2015

On Sat, Oct 31, 2015 at 5:50 PM, Nico Weber via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> I think we more commonly say "function pointer":
> $ grep 'pointer-to-function' include/clang/Basic/Diagnostic*td | wc -l
>        3
> $ grep 'function pointer' include/clang/Basic/Diagnostic*td | wc -l
>        7
> For "object pointer" and "pointer-to-object" it's currently a tie. For
> "member pointer" and "pointer-to-member", the former is more common too. We
> should probably make all of these consistent – any preferences? "foo
> pointer" reads easier to me than "pointer-to-foo", but I'm not a native
> speaker.

The C++ Standard has some unfortunate terminology here:


   The type of a pointer to void or a pointer to an object type is called
   an object pointer type. [ Note: A pointer to void does not have a
   pointer-to-object type, however, because void is not an object type. —
   end note ]

That makes standardizing on either problematic, because they have different
meanings (any pointer-to-object type is an object pointer type, but not
vice versa).

-- James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151101/ea1116c7/attachment.html>

More information about the cfe-commits mailing list