Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast-dds-gen-3.3.0 with idl-parser 3.0.0 : idl parse error observed when integer constant is set with a enumeration value #385

Open
srchaitu2008 opened this issue Jul 26, 2024 · 0 comments

Comments

@srchaitu2008
Copy link

Hi @richiware ,

Given below is another IDL file for which the processing fails (tested with idl-parser 3.0.0 alongwith fast-dds-gen 3.3.0 with the fix for fast-dds-gen issue 373 included ) :

module module1
{
enum mod1_enum_val
{
value1,
value2
}; //mod1_enum_val
}; //module1
const int32 myValUsingFullPathAsInt32 = module1::mod1_enum_val::value1;
const module1::mod1_enum_val myValUsingFullPath = module1::mod1_enum_val::value1;
const module1::mod1_enum_val myVal = module1::mod1_enum_val::value2;
module Top
{
const uint32 MAXLEN = 64;
const uint32 SeqLenAssumingThisModule = MAXLEN;
const uint32 SeqLen = Top::MAXLEN;
}; //Top
struct Sub
{
int32 userID;
double f64Data;
uint8 vChar;
}; //Sub
enum Modes
{
MODE1, //11
MODE2, //20
MODE3 //200
}; //Modes
const int32 myDefaultModeAsInt32 = Modes::MODE3;
const Modes myDefaultMode = Modes::MODE3;
const Modes myDefaultMode1 = Modes::MODE2;
typedef Sub SubSequence[Top::SeqLen];
struct AllSubs
{
SubSequence Subs;
}; //AllSubs

Error

Processing the file /tmp/IdlError3.idl...
/tmp/IdlError3.idl:9:70: error: Error evaluating expression: ;(module1_mod1_enum_val_value1) | 0
/tmp/IdlError3.idl:30:47: error: Error evaluating expression: ;Top_MAXLEN=64;Top_SeqLenAssumingThisModule=64;Top_SeqLen=64;(Modes_MODE3) | 0

Raising this issue as indicated in comments of fast-dds-gen issue 373

Thanking you,
S.Ravi.Chaitanya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant