public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joern Rennecke <amylaar@cygnus.co.uk>
To: eggert@twinsun.com (Paul Eggert)
Cc: phdm@macqel.be, gcc2@cygnus.com, egcs@cygnus.com
Subject: Re: #elsif
Date: Wed, 08 Apr 1998 09:27:00 -0000	[thread overview]
Message-ID: <199804081408.PAA05481@phal.cygnus.co.uk> (raw)
In-Reply-To: <199804080118.SAA26855@shade.twinsun.com>

>    Date: Tue, 7 Apr 1998 12:08:20 +0200 (MET DST)
>    From: "Philippe De Muyter" <phdm@macqel.be>
> 
>    #if defined(A)
> 	   printf("A defined\n");
>    #elsif  defined(B)
> 	   printf("B undefined\n");
>    #else   /* nor A nor B */
> 	   printf("nor A nor B defined\n");
>    #endif
> 
> As I read the C standard, if A is not defined, then GCC is required to
> accept that program fragment, though I admit the standard's wording is
> not entirely clear.
> 
> It might be useful for cpp to warn about skipped, unknown directives
> if -W or -Wall is specified.

IIRC the standard allows any number of warnings, no matter how bogus they
are.  So why not always warn about #elsif - it seems an obvious enough
typo to warn about even if we don't want to warn about unknown directives
in general.

  reply	other threads:[~1998-04-08  9:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-07  6:54 #elsif Philippe De Muyter
1998-04-07 19:34 ` #elsif Paul Eggert
1998-04-08  9:27   ` Joern Rennecke [this message]
1998-04-08 15:08   ` #elsif Gavin Romig-Koch
1998-04-08 23:35     ` #elsif Paul Eggert
1998-04-08 21:20       ` #elsif Philippe De Muyter
1998-04-08 21:13         ` #elsif Paul Eggert
1998-04-09  8:27           ` #elsif Joe Buck
1998-04-09  3:09         ` #elsif Nick Ing-Simmons
1998-04-08 21:45       ` #elsif Gavin Romig-Koch
1998-04-09 17:44       ` #elsif Joern Rennecke
     [not found] ` <199804080118.SAA26855.cygnus.egcs@shade.twinsun.com>
1998-04-08 15:08   ` #elsif Ulrich Drepper
1998-04-08  2:13 #elsif SXTHREE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199804081408.PAA05481@phal.cygnus.co.uk \
    --to=amylaar@cygnus.co.uk \
    --cc=egcs@cygnus.com \
    --cc=eggert@twinsun.com \
    --cc=gcc2@cygnus.com \
    --cc=phdm@macqel.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).