Skip to content

IDL enum issues - Same enumerator names, and a value specified [13812] #90

@webhoppery

Description

@webhoppery

Example : Test.idl (Test.txt attached)

Errors with : UNKNOWN = 0,
Had to Edit : UNKNOWN , // = 0,

Same enumerator names - UNKNOWN

cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.30.30706.0
cmake --build .
Test.cxx(44,46): error C2365: 'orov::msg::system::UNKNOWN': redefinition; previous definition was 'enumerator'

Test.h : Edit enum to enum class
Test.cxx(46,47): error C2065: 'UNKNOWN': undeclared identifier

Test.cxx : Prefix UNKNOWN with enum name ::
m_crc_result = orov::msg::system::EChecksumResult::UNKNOWN;
m_reset_cause = orov::msg::system::EMCUResetCause::UNKNOWN;

But other statements prefix with the enum name :
Test.txt

Could fastddsgen assume the enum is enum class and prefix UNKNOWN?

 m_crc_result = (orov::msg::system::EChecksumResult)enum_value;
m_reset_cause = (orov::msg::system::EMCUResetCause)enum_value;

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions