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

SCO Xenix (286) build error #1

Closed
Randrianasulu opened this issue Mar 25, 2023 · 4 comments
Closed

SCO Xenix (286) build error #1

Randrianasulu opened this issue Mar 25, 2023 · 4 comments

Comments

@Randrianasulu
Copy link

Basically in tok_io.c compiler barfs at
lines 220 and 564 - "error 1: newline in constant
86box_xenix_cc error
"

varargs also give me another error, but other object files seems to be OK

8box_xenix_cc error_2

@Randrianasulu
Copy link
Author

ah, modern gcc 11.2.0 output those as warnings too:

token.h:42:41: предупреждение: assignment to «int» from «char *» makes integer from pointer without a cast [-Wint-conversion]
   42 | #define put_ch(c)       putchar(last_ch = c)
      |                                         ^
tok_io.c:220:13: замечание: в расширении макроса «put_ch»
  220 |             put_ch(" ");
      |             ^~~~~~
tok_io.c: В функции «fix_line_control»:
tok_io.c:564:17: предупреждение: assignment to «int» from «char *» makes integer from pointer without a cast [-Wint-conversion]
  564 |         last_ch = "\n";
      |                 ^

I initially thought error was due to `` instead of "" but it was not the case ...

@udo-munk
Copy link
Owner

If you change a character constant 'c' to a string pointer "string" you'll get warnings from almost any compiler, because that is not what you want and very likely it won't work.

@Randrianasulu
Copy link
Author

:( yeah, I already changed ot back. Also, it seems second error screen is irrelevant bevause make does not compile this file :)

Can I preprocess this file with gcc's cpp and pass result to Xenix's cc ? (random idea)

@udo-munk
Copy link
Owner

Sure, you can try that, might help to locate the problem because the compiler error about a newline in the character constant is nonsense.

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

2 participants