[cfe-dev] Patch: making implicit cast between address space to be illegal

Bill Wendling isanbard at gmail.com
Wed Aug 6 00:12:17 PDT 2008


On Aug 6, 2008, at 12:00 AM, Mon P Wang wrote:

> Hi,
>
> If I remember the state of affairs properly, we decided that implicit
> cast between address spaces should be illegal.  Here is a patch that
> will generate an error if it occurs.  If you have any comments, please
> let me know.
>
>  -- Mon Ping
>
> Index: include/clang/Basic/DiagnosticKinds.def
> ===================================================================
> --- include/clang/Basic/DiagnosticKinds.def	(revision 54405)
> +++ include/clang/Basic/DiagnosticKinds.def	(working copy)
> @@ -658,6 +658,8 @@
>       "address space attribute requires an integer constant")
>  DIAG(err_attribute_address_multiple_qualifiers, ERROR,
>       "multiple address spaces specified for type")
> +DIAG(err_implicit_pointer_address_space_cast, ERROR,
> +     "illegal implicit cast between two pointers with different
> address space")

"space" should be "spaces" here.

-bw



More information about the cfe-dev mailing list