Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* cc and empty files
@ 1996-12-02  5:00 Ollivier Robert
  1996-12-06  5:00 ` Tim Lucia
  0 siblings, 1 reply; 3+ messages in thread
From: Ollivier Robert @ 1996-12-02  5:00 UTC (permalink / raw)



Hi,

I've found that when one is using ``-std1'' on the command line to the
bundled compiler, it refuses to compiles empty files (resulting from
#ifdef...#endif). Is there any way to work around this very annoying
behaviour.

Thanks for any answers, I'll summarize of needed.

PS: I can't install ``gcc''. The source concerned belong to beta versions of
Squid 1.1.
-- 
Ollivier ROBERT   -=- Eurocontrol EEC/TS -=-   Ollivier.Robert@eurocontrol.fr
FreeBSD FAQ: <URL:http://www.FreeBSD.org/FAQ/>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cc and empty files
  1996-12-02  5:00 cc and empty files Ollivier Robert
@ 1996-12-06  5:00 ` Tim Lucia
  1996-12-10  5:00   ` Joe Mario
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Lucia @ 1996-12-06  5:00 UTC (permalink / raw)
  To: Ollivier Robert


Ollivier Robert wrote:
> 
> Hi,
> 
> I've found that when one is using ``-std1'' on the command line to the
> bundled compiler, it refuses to compiles empty files (resulting from
> #ifdef...#endif). Is there any way to work around this very annoying
> behaviour.

from the cc man page:

  -std[n]
      Have the compiler produce warnings for language constructs that
are not
      standard in the language. The default is -std0.

      The -std flag enforces the ANSI C standard with popular
extensions.
      and causes the macro __STDC__=0 to be passed to the preprocessor.

      The value n can be one of the following:

      0   Enforce the K & R standard with some ANSI extensions, and
causes
          the __STDC__ macro to be undefined.

      1   Enforce the ANSI C standard and causes the macro __STDC__=1 to
be
          passed to the preprocessor.  Note that the -std1 flag also
affects
          linker defined symbols.  See the ld(1) reference page for more
          information.

An empty file is not an ANSI C standard file, so either don't use -std1
or have some code in the file which is conditionally included #if
__STDC__==1.

-- 
Timothy J. Lucia                    Digital Ladebug Debugger Developer
Digital Equipment Corporation       lucia@zko.dec.com
110 Spitbrook Road ZK2-3Q08         Phone:           603.881.2615
Nashua, NH  USA  03062-2698         Fax:             603.881.0120



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cc and empty files
  1996-12-06  5:00 ` Tim Lucia
@ 1996-12-10  5:00   ` Joe Mario
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Mario @ 1996-12-10  5:00 UTC (permalink / raw)



Ollivier Robert wrote:
>
> Hi,
>
> I've found that when one is using ``-std1'' on the command line to the
> bundled compiler, it refuses to compiles empty files (resulting from
> #ifdef...#endif). Is there any way to work around this very annoying
> behaviour.

As of the V4.0a release, the default C compiler was changed to issue
a warning diagnostic rather than an error diagnostic for empty files
in -std1 mode.

Joe



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-12-10  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-12-02  5:00 cc and empty files Ollivier Robert
1996-12-06  5:00 ` Tim Lucia
1996-12-10  5:00   ` Joe Mario

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox