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

Broken gcc #25

Open
jwilk opened this issue Jun 5, 2023 · 4 comments
Open

Broken gcc #25

jwilk opened this issue Jun 5, 2023 · 4 comments

Comments

@jwilk
Copy link
Collaborator

jwilk commented Jun 5, 2023

In #9, @kotborealis added a gcc command, but this doesn't quite work with arbitrary files.
For example:

$ cat README.md | wc -l
44

$ gcc -E -P -xc README.md | wc -l
README.md:1:3: error: invalid preprocessing directive #cat
    1 | # cat(1) golf
      |   ^~~
35

While it's an interesting hack, I don't think it belongs in the "Pure league".

@xyproto
Copy link
Contributor

xyproto commented Jun 6, 2023

Agree. Also m4 has a similar problem when using it as cat.

@wader
Copy link
Owner

wader commented Jun 6, 2023

Yeap seems reasonable 👍

xyproto added a commit to xyproto/catgolf that referenced this issue Jun 6, 2023
@jwilk
Copy link
Collaborator Author

jwilk commented Jun 6, 2023

And then there's gcc -xc file.txt in "Error league", which doesn't work like cat at all?!
I'm confused.

xyproto added a commit to xyproto/catgolf that referenced this issue Jun 6, 2023
@xyproto
Copy link
Contributor

xyproto commented Jun 11, 2023

This one might belong in the new "Brittle league"?

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

3 participants