Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Tim Lucia <lucia@zko.dec.com>
To: Ollivier Robert <Ollivier.Robert@eurocontrol.fr>
Subject: Re: cc and empty files
Date: 1996/12/06	[thread overview]
Message-ID: <32A84217.156@zko.dec.com> (raw)
In-Reply-To: 57uvru$aon@polaris.eurocontrol.fr


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



  reply	other threads:[~1996-12-06  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-02  5:00 cc and empty files Ollivier Robert
1996-12-06  5:00 ` Tim Lucia [this message]
1996-12-10  5:00   ` Joe Mario
read-only archive

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