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

If "p4include" is in the path, treat the file as system file. #4742

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

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Jun 23, 2024

No description provided.

@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Jun 23, 2024
@vlstill
Copy link
Contributor

vlstill commented Jun 27, 2024

wouldn't it be better to use -isystem like GCC/clang to manage what is system file?

@fruffy
Copy link
Collaborator Author

fruffy commented Jun 27, 2024

That might be a better approach. It'd be nice if non-system includes were also preserved, but it seems complicated to reconstructed this after the preprocessed has inlined everything.

@vlstill
Copy link
Contributor

vlstill commented Jul 1, 2024

And what is the problem you are trying to solve here? How are system includes treated differently from non-system once in P4C?

@fruffy
Copy link
Collaborator Author

fruffy commented Jul 1, 2024

And what is the problem you are trying to solve here? How are system includes treated differently from non-system once in P4C?

The problem is that there might be multiple "system" paths but the current check only allows one and is not very extensible. Plus, as you suggested it might be nice to decide what is a system path and what is not with the command line.

@fruffy fruffy force-pushed the fruffy/p4include_system_path branch from 01edfdd to e6048a1 Compare July 3, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants