🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3568

Re: Why I will choose Borland

#3568
From: Colin Jensen
Date: Sat, 23 Jan 1993 19:29
28 lines
1288 bytes
In article <727547182.AA07615@tdkt.kksys.com> Scott.Jibben@f115.n282.z1.tdkt.kksys.com (Scott Jibben) writes:
>  >>The most common example is disabling the
>  >>parameter-not-used warning on vectored procedures...
>
>DM>And, fwiw, you can shut up those messages by casting the parameter to
>  >void:
>
>Isn't it possible to turn off those warnings via a #pragma or something
>like this:
>
>void foo( int )  // note: I removed the variable name.
>{
>  printf( "I like C.\n" );
>  return
>}

You program should really say
    printf("I like C++.\n");
since your method of shutting up warnings is only legal in C++, and is
completly illegal in ANSI-C.

The most portable way to shut up the not-used warnings in ANSI-C
is the cast to void trick which works for all of the compilers I have
ever used.

-- 
Colin Jensen
ljensen@netcom.netcom.com	cjensen@ampex.com
Technical Details
Message-ID: <1993Jan23.192929.21891@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!hal.com!decwrl!csus.edu!netcom.com!ljensen
References: <727547182.AA07615@tdkt.kksys.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!hal.com!decwrl!csus.edu!netcom.com!ljensen
From: ljensen@netcom.com (Colin Jensen)
Newsgroups: comp.os.os2.programmer
Subject: Re: Why I will choose Borland
Message-ID: <1993Jan23.192929.21891@netcom.com>
Date: 23 Jan 93 19:29:29 GMT
References: <727547182.AA07615@tdkt.kksys.com>
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Lines: 28