-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Redeclaring main
doesn't trigger an error
#4826
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
Comments
** Placing it outside of Setup() or Loop() causes it otherwise it doesnt affect |
adding it before setup() is the same as placing it outside setup(). So Your description does not really make sense at all. Also main is reserved for the main loop hidden by the arduino IDE. Just dont use main as its is a reserved name. |
Indeed the problem here is about the compiler not emitting any error/warning.
to |
@facchinm |
@facchinm I can see that you reach the issue as i did, and must have a warning at least to prevent it. I fixed it changing the name of the variable. If you consider that this thread has become irrelevant besides the possible addition of a warning to the compiler, let me know to close it, thank you very much for your answers! |
main
doesn't trigger an error
Let's keep this issue as reference for being closed by the upcoming PR 😄 |
Adding "int main = 0;" before setup() deny any TX Data from your arduino, could anybody confirm it please or if you can explain it :D
The text was updated successfully, but these errors were encountered: