www.digitalmars.com         C & C++   DMDScript  

c++ - How to turn off strict prototype?

reply Greatwolf <gmane.greatwolf mamber.net> writes:
Hi,

I'm trying to test some benchmarking code with the dmc compiler but when
compiling the source, I get error function has no prototype. Is there
anyway to disable strict prototyping so it has similar behavior to other
C++ compilers?

I tried adding -r- to the commandline like this:

dmc.exe -r- -mn -c -6 -o -DWIN32 -DNDEBUG    -Ig:\dm\stlport\stlport -Ig:
\dm\include  -r- -oRelease\stepanov_vector.obj stepanov_vector.cpp

but it still gave the same error. I tried putting it in the middle and at 
the end of the command as well. None of them worked.

Thanks
Oct 14 2010
parent Walter Bright <newshound2 digitalmars.com> writes:
Greatwolf wrote:
 I'm trying to test some benchmarking code with the dmc compiler but when
 compiling the source, I get error function has no prototype. Is there
 anyway to disable strict prototyping so it has similar behavior to other
 C++ compilers?
 
 I tried adding -r- to the commandline like this:
 
 dmc.exe -r- -mn -c -6 -o -DWIN32 -DNDEBUG    -Ig:\dm\stlport\stlport -Ig:
 \dm\include  -r- -oRelease\stepanov_vector.obj stepanov_vector.cpp
 
 but it still gave the same error. I tried putting it in the middle and at 
 the end of the command as well. None of them worked.

There is no way to turn it off for C++ code.
Oct 20 2010