Skip to content

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

Open
100apps wants to merge 1 commit into
rswier:masterfrom
100apps:master
Open

fix compile error: first parameter of 'main' (argument count) must be of type 'int'#70
100apps wants to merge 1 commit into
rswier:masterfrom
100apps:master

Conversation

@100apps
Copy link
Copy Markdown

@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
Copy Markdown

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.

2 participants