Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.

reserved identifier violation #7

Closed
elfring opened this issue Feb 18, 2016 · 3 comments
Closed

reserved identifier violation #7

elfring opened this issue Feb 18, 2016 · 3 comments
Assignees
Milestone

Comments

@elfring
Copy link

elfring commented Feb 18, 2016

I would like to point out that identifiers like "_CALL_STATE" and "_CMD_TYPE" do not fit to the expected naming convention of the C++ language standard.
Would you like to adjust your selection for unique names?

@karl-lunarg
Copy link
Contributor

Thanks for your input. We'll schedule this work for the near future.

@lentinem lentinem added this to the P2 milestone Mar 1, 2016
@mark-lunarg
Copy link
Collaborator

Fixed and pushed to Master.

@elfring
Copy link
Author

elfring commented May 21, 2016

Thanks for your improvement of affected identifiers.

evelikov pushed a commit to evelikov/Mesa that referenced this issue Jan 20, 2017
We can't import the latest vk_icd.h because the new header breaks the
Mesa build. This patch defines new casting macros,
ICD_DEFINE_NONDISP_HANDLE_CASTS() and ICD_FROM_HANDLE(), which can
handle both the old and new vk_icd.h, and will prevent the build from
breaking when we update the header.

In the old vk_icd.h, types were defined as:

  typedef struct _VkIcdFoo {
    ...
  } VkIcdFoo;

Commit 6ebba1f6 in the Vulkan loader changed the above to

  typedef {
    ...
  } VkIcdFoo;

because the old definitions violated the C and C++ specs. According to
the specs, identifiers that begins with an underscore followed by an
uppercase letter are reserved. (It's pedantic, I know), See the Github
issue referenced below.

References: KhronosGroup/Vulkan-LoaderAndValidationLayers#7
References: KhronosGroup/Vulkan-LoaderAndValidationLayers@6ebba1f
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit c085bfc)
evelikov pushed a commit to evelikov/Mesa that referenced this issue Jan 20, 2017
We can't import the latest vk_icd.h because the new header breaks the
Mesa build. This patch defines new casting macros,
ICD_DEFINE_NONDISP_HANDLE_CASTS() and ICD_FROM_HANDLE(), which can
handle both the old and new vk_icd.h, and will prevent the build from
breaking when we update the header.

In the old vk_icd.h, types were defined as:

  typedef struct _VkIcdFoo {
    ...
  } VkIcdFoo;

Commit 6ebba1f6 in the Vulkan loader changed the above to

  typedef {
    ...
  } VkIcdFoo;

because the old definitions violated the C and C++ specs. According to
the specs, identifiers that begins with an underscore followed by an
uppercase letter are reserved. (It's pedantic, I know), See the Github
issue referenced below.

References: KhronosGroup/Vulkan-LoaderAndValidationLayers#7
References: KhronosGroup/Vulkan-LoaderAndValidationLayers@6ebba1f
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit c085bfc)
evelikov pushed a commit to evelikov/Mesa that referenced this issue Jan 24, 2017
We can't import the latest vk_icd.h because the new header breaks the
Mesa build. This patch defines new casting macros,
ICD_DEFINE_NONDISP_HANDLE_CASTS() and ICD_FROM_HANDLE(), which can
handle both the old and new vk_icd.h, and will prevent the build from
breaking when we update the header.

In the old vk_icd.h, types were defined as:

  typedef struct _VkIcdFoo {
    ...
  } VkIcdFoo;

Commit 6ebba1f6 in the Vulkan loader changed the above to

  typedef {
    ...
  } VkIcdFoo;

because the old definitions violated the C and C++ specs. According to
the specs, identifiers that begins with an underscore followed by an
uppercase letter are reserved. (It's pedantic, I know), See the Github
issue referenced below.

References: KhronosGroup/Vulkan-LoaderAndValidationLayers#7
References: KhronosGroup/Vulkan-LoaderAndValidationLayers@6ebba1f
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit c085bfc)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants