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

Some fixes for modern Arch Linux, bison and gcc 14 #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

andi8086
Copy link

Here are some suggestions to make it work on modern Linux with:

  • bison 3.8.2
  • gcc 14.1.1

There are two fixes regarding gcc 14.1.1:

  • main function of lcc must be of return type 'int'
  • yylexx() must be declarated in .y otherwise gcc 14 bails out with 'implicit function declaration'

I included an example build script for linux since this was not so straight forward for me to understand, how to compile it.
It also takes care of using "bison" instead of "bison -y" because "bison -y" gives warnings about not supporting "%term".

Furthermore, gram.c is generated and should hence not be in the git.

Andreas J. Reichel and others added 3 commits May 28, 2024 20:56
'bison -y' is default emulation for yacc on linux and
this spits out warnings that %term is not supported.
So don't use emulation mode of yacc but bison instead.

Default output file is bison.gram.c, set it to y.gram.c

Signed-off-by: Andreas J. Reichel <[email protected]>
main is supposed to be 'int'

Signed-off-by: Andreas J. Reichel <[email protected]>
gram.c is generated by BISON and should not be in the source
tree.

Signed-off-by: Andreas J. Reichel <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant