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

fix compile error: first parameter of 'main' (argument count) must be of type 'int' #70

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

Conversation

100apps
Copy link

@100apps 100apps commented Feb 26, 2022

when I compile c4 file in mac:
➜ c4 git:(master) gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

➜ c4 git:(master) gcc -w c4.c
c4.c:333:5: error: first parameter of 'main' (argument count) must be of type 'int'
int main(int argc, char **argv)
^
1 error generated.

so, change int to signed fix this error

…ment count) must be of type 'int' int main(int argc, char **argv)
@PatrickvL
Copy link

PatrickvL commented Feb 26, 2022

This would break self compilation and was addressed in #66 as well

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.

None yet

2 participants