🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1379

Re: warning: '/*' within comment

#1379
From: D'Arcy J.M. Cain
Date: Mon, 04 Jun 1990 12:52
29 lines
2010 bytes
In article <13040@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes:
>In article <1990Jun1.200433.6919@druid.uucp> darcy@druid.UUCP (D'Arcy J.M. Cain) writes:
>>However I got the same warning.  Is there anything in the standard that
>>allows the compiler to ignore the quotes while inside a comment.
> [...]
>My advice to you is to tell your compiler vendor that you don't
>appreciate gratuitous warning messages, and that
>	/*	stuff;	/* comment */
>is a fairly common usage for avoiding code generation when the
>programmer wants to indication an operation that would normally
>be necessary, but fortuitously happens to be already taken care
>of in a particular case.
But I do appreciate it most of the time.  The proper way to do what you
are suggesting is to use "#if 0" instead of a comment.  What I want is
a way to tell the compiler that in this case I really mean what I am
saying so please don't warn me.  It is sort of like the construct "if
(a = getval())" which may generate a warning.  It's a good warning and
can be avoided by "if ((a = getval()) != 0)" if you really mean it.

I considered using the "#if 0" construct to handle my example but that
would probably mean closing the regular comment and reopening it after the
#endif.  I am sure that the compiler would ignore any #if statement in
a comment.

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Government:
D'Arcy Cain Consulting             |   Organized crime with an attitude
West Hill, Ontario, Canada         |
(416) 281-6094                     |
Technical Details
Message-ID: <1990Jun4.125220.3844@druid.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!robohack!druid!darcy
References: <1990Jun1.200433.6919@druid.uucp> <13040@smoke.BRL.MIL>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!robohack!druid!darcy
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Newsgroups: comp.std.c
Subject: Re: warning: '/*' within comment
Message-ID: <1990Jun4.125220.3844@druid.uucp>
Date: 4 Jun 90 12:52:20 GMT
References: <1990Jun1.200433.6919@druid.uucp> <13040@smoke.BRL.MIL>
Reply-To: darcy@druid.UUCP (D'Arcy J.M. Cain)
Organization: D'Arcy Cain Consulting, West Hill, Ontario
Lines: 29