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

[Tofino] Move vector.c to C++ #5203

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[Tofino] Move vector.c to C++ #5203

wants to merge 1 commit into from

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Mar 29, 2025

No description provided.

@github-actions github-actions bot added the tofino Topics related to the Tofino switch and back end. label Mar 29, 2025
@fruffy fruffy changed the title [tofino] Move vector.c to C++ [Tofino] Move vector.c to C++ Mar 29, 2025
Signed-off-by: fruffy <fruffy@nyu.edu>
@fruffy fruffy marked this pull request as ready for review April 5, 2025 10:11
@fruffy fruffy force-pushed the fruffy/vector_cpp branch from 79534eb to c7e84c1 Compare April 5, 2025 10:11
Copy link
Contributor

@vlstill vlstill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason to have it as .cpp? This is very C-style code with a bunch of ugly macros that in C++ should be replaced by templates (or just by use of std::vector possibly). If we need it, I would actually rather have it as C file, then slowly eliminate the uses and finally remove this entirely.

@fruffy
Copy link
Collaborator Author

fruffy commented Apr 7, 2025

Is there any particular reason to have it as .cpp? This is very C-style code with a bunch of ugly macros that in C++ should be replaced by templates (or just by use of std::vector possibly). If we need it, I would actually rather have it as C file, then slowly eliminate the uses and finally remove this entirely.

clang throws an compilation error under certain configuration (e.g., with gnu-extensions enabled). There was also a bunch of special casing. If you have a way to get rid of it safely, I am all for it. My main priority is to get compilation to work reliably right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tofino Topics related to the Tofino switch and back end.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants