VHDL232: C++ keywords should not be used as entity name or generic name or port name

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
--LOWConsistency | Conventional5minsynthesis, vscode, simulation, linter

Description

To be able to embed VHDL code into C/C++ code, this rule checks if C/C++ reserved words are used as:

  • Entity name
  • Port name
  • Generic name

The following keywords are checked:

alignas, alignof, and, and_eq, asm, atomic_cancel, atomic_commit, atomic_noexcept, auto, bitand, bitor, bool, break, case, catch, char, char16_t, char32_t, char8_t, class, co_await, co_return, co_yield, compl, concept, const, const_cast, consteval, constexpr, constinit, continue, decltype, default, delete, do, double, dynamic_cast, else, enum, explicit, export, extern, false, float, for, friend, goto, if, inline, int, long, mutable, namespace, new, noexcept, not, not_eq, nullptr, operator, or, or_eq, private, protected, public, reflexpr, register, reinterpret_cast, requires, return, short, signed, sizeof, static, static_assert, static_cast, struct, switch, synchronized, template, this, thread_local, throw, true, try, typedef, typeid, typename, union, unsigned, using, virtual, void, volatile, wchar_t, while, xor, xor_eq

Noncompliant code example

entity public is -- Noncompliant: "public" is a C++ keyword
  ...
end;

Compliant solution

entity fly is
  ...
end;

Parameters

No parameters.