[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libc6-dev and "-pedantic -O" warnings



On 08-Jun-99, 14:26 (CDT), Shawn Yarbrough <shawn@rivalsoftware.com> wrote: 
> The stupid header is not ANSI compliant, so if you turn on ANSI
> compilation mode, the header won't compile.  Which means that you can't
> write ANSI C programs that open windows, at least I couldn't figure out
> how to do so.  Maybe there is a way, but I don't have time to work
> around such MS BS.

ObPedantic: If you are trying to open "window" (whatever that is; my
copy of the ISO C standard makes no mention of any such thing, or of a
<windows.h> header file), you've already stepped outside of the bounds
of ISO C.

But I understand what you're trying to do: use the MSWindows OS, but
have the compiler warn about non-ISO language constructs (as opposed
to library issues). I think you can actually accomplish this, but it
requires a lot #pragma to activate and deactivate various warnings, and
isn't worth the effort. A better choice is to run the code through "gcc
-Wall" (not "--pedantic") on a system with the windows header files
copied over. You'll still get some flaky warnings, but you'll also pick
up some of your screw ups.


Reply to: