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

SV 'typedef enum's marked with /*verilator public*/ get translated to C++ 'enum's instead of 'typedef enum's #843

Closed
veripoolbot opened this issue Nov 8, 2014 · 4 comments
Labels
resolution: no fix needed Closed; no fix required (not a bug)

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jonathon Donaldson
Original Redmine Issue: 843 from https://www.veripool.org
Original Date: 2014-11-08


This is related to the new feature in Issue #833. Here is a patch. I tested it and it work well with my code.

Couple warnings:

  1. This is the first time I've ever created a git patch so hopefully I did it right.
  2. I'm not 100% sure that I changed everything that needed to be changed.
@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathon Donaldson
Original Date: 2014-11-08T09:16:39Z


Sorry, last patch had a minor bug. Forgot to put the actual type name after the closing bracket and before the semicolon. Works good now.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-11-08T13:28:48Z


Can you explain why you need this? In C++ unlike C a "enum foo" can be used as just "foo", normally you would not use a typedef.

But thanks for making your first patch!

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathon Donaldson
Original Date: 2014-11-08T18:09:44Z


Ok yeah, I had no idea that you could do that in C++. I'm primarily a C programmer. That's really cool to know that you can do that in C++.

Ignore this patch. :) Thanks!

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-11-08T21:31:00Z


Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: no fix needed Closed; no fix required (not a bug)
Projects
None yet
Development

No branches or pull requests

1 participant