public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pavel.morozkin at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29132] If <stdc-predef.h> is not preincluded, then #define __STDC_xxx violate C11 6.10.8
Date: Mon, 09 May 2022 16:43:47 +0000	[thread overview]
Message-ID: <bug-29132-131-XUm9pVsuPq@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29132-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29132

--- Comment #3 from Pavel M <pavel.morozkin at gmail dot com> ---
>From glibc-2.31 (the latest one probably is the same):
stdio.h:
#include <libio/stdio.h>

libio/stdio.h:
#include <bits/libc-header-start.h>

bits/libc-header-start.h:
#include <features.h>

features.h:
#include <stdc-predef.h>

stdc-predef.h:
#define __STDC_IEC_559__                1
#define __STDC_IEC_559_COMPLEX__        1
#define __STDC_ISO_10646__              201706L

Here we see that an implementation, which does not preinclude <stdc-predef.h>,
defines __STDC_xxx, which violates C11 6.10.8.

Example:
//__STDC_xxx is not defined
#include <stdio.h>
//__STDC_xxx is defined

Here we see that the values of the predefined macros do not remain constant
throughout the translation unit.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-05-09 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 10:58 [Bug libc/29132] New: " pavel.morozkin at gmail dot com
2022-05-09 11:31 ` [Bug libc/29132] " fweimer at redhat dot com
2022-05-09 11:49 ` schwab@linux-m68k.org
2022-05-09 16:43 ` pavel.morozkin at gmail dot com [this message]
2022-05-09 18:54 ` joseph at codesourcery dot com
2022-05-10 19:28 ` pavel.morozkin at gmail dot com

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=bug-29132-131-XUm9pVsuPq@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).