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

Add support for __VA_ARGS__ in a `define MACRO #1191

Open
zaun opened this issue Dec 26, 2024 · 0 comments
Open

Add support for __VA_ARGS__ in a `define MACRO #1191

zaun opened this issue Dec 26, 2024 · 0 comments

Comments

@zaun
Copy link

zaun commented Dec 26, 2024

I'd like to create some more flexible macros, mostly for logging. Something like:

`define LOG(CATEGORY, MESSAGE, ...) \
    $display("[%s] %0t: " MESSAGE, CATEGORY, $time, __VA_ARGS__)

but at the moment this isn't supported an I get

error: malformed `define directive ('.').

This is just an enhancement request, not a bug.

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