Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c > #6142

Re: 7.1.4p2 vs. Annex J

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.std.c
Subject Re: 7.1.4p2 vs. Annex J
Date 2020-08-04 07:29 -0700
Organization None to speak of
Message-ID <877due8oxj.fsf@nosuchdomain.example.com> (permalink)
References <87bljr84ay.fsf@nosuchdomain.example.com> <rgb7ml$a4b$1@solani.org>

Show all headers | View raw


Philipp Klaus Krause <pkk@spth.de> writes:
> J.2 is informative, and the part you quoted refers to normative text
> 7.1.2. In the current C2X draft N2479, the relevant sentenceg in 7.1.2 is:
>
> "If used, a header shall be included outside of any external declaration
> or definition, and it shall first be included before the first reference
> to any of the functions or objects it declares, or to any of the types
> or macros it defines."
>
> So clearly, the undefined behaviour does not happen when the header is
> not used at all.

Please quote (some of) the article you're replying to.

In N2479, J.2 still says the behavior is undefined if:

    - A function, object, type, or macro that is specified as being
      declared or defined by some standard header is used before any
      header that declares or defines it is included (7.1.2).

The normative text is clear enough in both N1570 and N2479.  The text in
J.2 is at best unclear.  That's the error I'm referring to.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */

Back to comp.std.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

7.1.4p2 vs. Annex J Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-03 20:42 -0700
  Re: 7.1.4p2 vs. Annex J Ike Naar <ike@otaku.sdf.org> - 2020-08-04 05:26 +0000
  Re: 7.1.4p2 vs. Annex J Philipp Klaus Krause <pkk@spth.de> - 2020-08-04 10:53 +0200
    Re: 7.1.4p2 vs. Annex J Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-04 07:29 -0700
  Re: 7.1.4p2 vs. Annex J Andy Walker <anw@cuboid.co.uk> - 2020-08-05 10:47 +0100

csiph-web