Comments (4)
Note that putting void
for the arguments removes the warning. That is void empty_func(void)
instead of void empty_func()
.
from orangec.
Hi @lionfaith!
I send a pull request to David, with the correction of this problem, take a look in pull #18
from orangec.
Hi Lionfaith,
yes that is expected, emptyfunc() is different from emptyfunc(void) in
the C language (because the former actually allows you to put any number
of arguments in the call whereas the latter allows you to put none).
The disparity between those is part of the reason for the warning.
In C++ that was changed so that the two prototypes are equivalent.
Bencz's change fixes the problem but I think it has unintended side
effects. It may not properly issue errors if the argument types don't
match the parameter types.
After some playing around with mingw32-cc I decided to leave the warning
but demote it to a 'trivial' warning so it won't show up unless you ask
for it.
I will have a new release within the next couple of days.
David
lionfaith wrote:
Note that putting |void| for the arguments removes the warning. That
is |void empty_func(void)| instead of |void empty_func()|.—
Reply to this email directly or view it on GitHub
#17 (comment).
from orangec.
Hi David,
thanks for your nice answer with my mistake.
C is confusing and even experienced programmer makes the mistake as I could read on stackoverflow. I just tested the same code on this online compiler with Clang and Gcc. And here I could test with msvc. Apparently, none of them complains about empty_func().
Thanks to you @bencz for your quick response.
from orangec.
Related Issues (20)
- omake -t doesn't work HOT 1
- All recent builds on AppVeyor CI were cancelled HOT 1
- Build will fail if the source directory is nested too deep HOT 11
- Add `dist-clean` make target
- Debug build Orange C on MSYS2 (MINGW64) with `omake`
- Support using of `mingw32-make` to build Orange C on Windows Command Prompt HOT 4
- `ORANGEC_ONLY=YES` doesn't work with `mingw32-make`
- Possibly incompatibility between `omake` and `mingw32-make` HOT 1
- What do you think about adding something like `osed`? HOT 5
- `HAVE_UNISTD_H` is misleading HOT 9
- Even on MSYS2 it's possible to call `cmd.exe` HOT 3
- `src/clibs/platform/win32/makefile` HOT 12
- `mingw32-make` doesn't correctly create the zipped files HOT 1
- Decoupling Orange C from MSYS2 HOT 1
- Modify the tokenizer to be reusable with different keywords for the same project. HOT 11
- [AppVeyor] `omake` crashed HOT 18
- omake should handle GNU make's `--jobserver-auth=` switch HOT 4
- `omake COMPILER=OCC exebuild` failed
- Support for `_set_thread_local_invalid_parameter_handler`? HOT 3
- Adding CPU targeting and CPU specific optimizations HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orangec.