Using octet disc. in union results in opendds_idl compile error
Open
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 516
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 4
Description
When using @optional with a union opendds_idl gives an error
Test file:
union TestUnion_Octet switch(octet) {
case 1:
@optional short FirstCase;
default:
@optional long myinft;
};
Compiled using:
opendds_idl -Sa -St --no-dcps-data-type-warnings -Lc++11 --no-default-nested -Gxtypes-complete optional.idl
Results in the error
Error - /home/johnny/ACE/OpenDDS/bin/opendds_idl: "optional.idl", line 7: Unhandled ExprType value in generateDefaultValue
Fatal Error - Aborting
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the optional.idl reproducer and run the provided opendds_idl command to confirm the generateDefaultValue error for an octet-switched union. Trace the IDL compiler path handling @optional union members and inspect linked pull request #4797 before making changes. Done means the reproducer compiles without the fatal error and has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100