Skip to content

Fix C struct Padding#69

Closed
lorenzschmid wants to merge 8 commits intotgingold-cern:masterfrom
lorenzschmid:fix-c-struct
Closed

Fix C struct Padding#69
lorenzschmid wants to merge 8 commits intotgingold-cern:masterfrom
lorenzschmid:fix-c-struct

Conversation

@lorenzschmid
Copy link
Contributor

Fixes empty name for padding fields in C typdef structure. Error was introduced in initial commit for C typdef structures in #63.

e.g.

typedef struct {
  uint32_t rstn: 1;
  uint32_t : 31;
} plc_ctrl_s;

where the second field has no name and hence, is invalid, becomes

typedef struct {
  uint32_t rstn: 1;
  uint32_t _bits_1_to_31: 31;
} plc_ctrl_s;

Furthermore, this PR signals an error, if C structures are generated and a bit field uses a reserved C keyword.

@lorenzschmid
Copy link
Contributor Author

Not sure why the jobs are failing. Seems to be an issue with downloading some required tools. The changes proposed here pass the tests locally.

@tgingold-cern tgingold-cern force-pushed the master branch 2 times, most recently from 79f6b30 to 4439c2f Compare August 25, 2025 13:04
@lorenzschmid lorenzschmid closed this by deleting the head repository Sep 5, 2025
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

Successfully merging this pull request may close these issues.

2 participants