[committed] c: Update nullptr_t comparison checks

2023-02-02 Thread Joseph Myers
WG14 has agreed to allow equality comparisons between pointers and nullptr_t values that are not null pointer constants (this was previously an exceptional case where such nullptr_t values were handled differently from null pointer constants; other places in the standard allowed nullptr_t values,

[committed] c: Update checks on constexpr floating-point initializers

2023-02-02 Thread Joseph Myers
WG14 has agreed some changes (detailed at the end of N3082) to the rules on constexpr initializers for floating types. Update GCC's implementation to match: binary initializers are now allowed for decimal types, and real initializers for complex types, but signaling NaN initializers can't be used

[committed] c: Disallow braces around C2x auto initializers

2023-01-27 Thread Joseph Myers
WG14 agreed at this week's meeting to remove support for braces around auto scalar initializers, as incompatible with C++ auto handling of braced initializers; thus remove that support in GCC. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/c/ * c-parser.cc

Re: [PATCH] driver: fix -gz=none error message with missing zstd

2023-01-27 Thread Joseph Myers
On Fri, 27 Jan 2023, Martin Liška wrote: > We wrongly report: > > $ echo "int main () {}" | gcc -xc -gz=none - > gcc: error: -gz=zstd is not supported in this configuration > > if zstd compression is not supported by binutils. We should emit the > error message only if -gz=zstd. > > PR

Re: [committed] C-SKY: Define SYSROOT_SUFFIX_SPEC.

2023-01-20 Thread Joseph Myers
On Fri, 13 Jan 2023, Xianmiao Qu via Gcc-patches wrote: > The earlier patch > https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575418.html > refine the way to generate sysroot suffix, but it can't find the > right path for all CPUs. The SYSROOT_SUFFIX_SPEC should be defined > to fix it. I

Re: [PATCH] c: ICE with nullptr as case expression [PR108424]

2023-01-18 Thread Joseph Myers
On Wed, 18 Jan 2023, Marek Polacek via Gcc-patches wrote: > In this ICE-on-invalid, we crash on > > gcc_assert (INTEGRAL_TYPE_P (type)); > > in perform_integral_promotions, because a nullptr is an INTEGER_CST, > but not INTEGRAL_TYPE_P, and check_case_value is only checking the > former. In

Re: [PATCH] c: Don't emit DEBUG_BEGIN_STMTs for K function argument declarations [PR105972]

2023-01-11 Thread Joseph Myers
On Wed, 11 Jan 2023, Jakub Jelinek via Gcc-patches wrote: > The following patch ensures we don't emit any such DEBUG_BEGIN_STMTs for the > K function parameter declarations even in nested functions. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2023-01-11 Jakub

Re: [PATCH] longlong.h: Do no use asm input cast for clang

2023-01-10 Thread Joseph Myers
On Tue, 10 Jan 2023, Adhemerval Zanella Netto via Gcc-patches wrote: > That's my original intention [1], but Joseph stated that GCC is the upstream > source of this file. Joseph, would you be ok for a similar patch to glibc > since gcc is reluctant to accept it? I don't think it's a good idea

[committed] c: Check for modifiable static compound literals in inline definitions

2023-01-09 Thread Joseph Myers
The C rule against modifiable objects with static storage duration in inline definitions should apply to compound literals (using the C2x feature of storage-class specifiers for compound literals) just as to variables. Add a call to record_inline_static for compound literals to make sure this

[committed] c: C2x semantics for __builtin_tgmath

2023-01-06 Thread Joseph Myers
__builtin_tgmath implements semantics for integer generic arguments that handle cases involving _FloatN / _FloatNx types as specified in TS 18661-3 plus some defect fixes. C2x has further changes to the semantics for macros with such types, which should also be considered defect fixes (although

Re: [PATCH] Darwin, crts: Provide scalb and significand as a crt [PR107631]

2023-01-03 Thread Joseph Myers
On Tue, 3 Jan 2023, Iain Sandoe wrote: > 1. Modula-2 should not forward the builtins unless the target supports them, > either by expansion or the relevant lib functions. So that would need > some >configury and conditional build code. Note that such configure tests could only readily

Re: [PATCH] Darwin, crts: Provide scalb and significand as a crt [PR107631]

2023-01-03 Thread Joseph Myers
On Sat, 31 Dec 2022, Iain Sandoe wrote: > builtins.def unconditionally defines these builtins to be DEF_EXT_LIB_BUILTIN > which expands to the libcall, this is currently hard-wired to FALLBACK_P = > true. > > but, AFAIU the builtins.def descriptions: > > FALLBACK_P should be false if the libc

Re: [PATCH] Darwin, crts: Provide scalb and significand as a crt [PR107631]

2022-12-30 Thread Joseph Myers
On Fri, 30 Dec 2022, Iain Sandoe via Gcc-patches wrote: > This patch is providing functions used by the modula-2 implementation. > > At present, I've used a crt rather than adding symbols to libgcc, since > it is not clear if the modula-2 might alter the use of scalb to scalbn > (although that

Re: [RFC/PATCH] Remove the workaround for _Float128 precision [PR107299]

2022-12-22 Thread Joseph Myers
On Thu, 22 Dec 2022, Segher Boessenkool wrote: > Hi! > > On Wed, Dec 21, 2022 at 09:40:24PM +0000, Joseph Myers wrote: > > On Wed, 21 Dec 2022, Segher Boessenkool wrote: > > > > --- a/gcc/tree.cc > > > > +++ b/gcc/tree.cc > > > > @@ -9442,15 +

Re: [RFC/PATCH] Remove the workaround for _Float128 precision [PR107299]

2022-12-21 Thread Joseph Myers
On Wed, 21 Dec 2022, Segher Boessenkool wrote: > > --- a/gcc/tree.cc > > +++ b/gcc/tree.cc > > @@ -9442,15 +9442,6 @@ build_common_tree_nodes (bool signed_char) > >if (!targetm.floatn_mode (n, extended).exists ()) > > continue; > >int precision = GET_MODE_PRECISION (mode); > >

Re: [C PATCH] remove same_translation_unit_p

2022-12-20 Thread Joseph Myers
On Tue, 20 Dec 2022, Martin Uecker via Gcc-patches wrote: > Here is a patch to remove the unused function > same_translation_unit_p and related code. The > code to check for structural equivalency of > structs / unions is kept (with some fixes) > because it will be needed for C2X. Could you

Re: [PATCH 2/3] Make __float128 use the _Float128 type, PR target/107299

2022-12-15 Thread Joseph Myers
On Thu, 15 Dec 2022, Kewen.Lin via Gcc-patches wrote: > By investigating the exposed NaN failures, I found it's due to that it wants > to convert _Float128 type constant to long double type constant, it goes > through function real_convert which clears the signalling bit in the context > of

Re: [PATCH Rust front-end v4 46/46] gccrs: Add README, CONTRIBUTING and compiler logo

2022-12-13 Thread Joseph Myers
On Tue, 13 Dec 2022, Martin Liška wrote: > If the Rust folks are willing to use Sphinx, then yes, I'm going to > prepare a common infrastructure (baseconf.py, common license files and a > common Makefile). So something similar to what I prepared for the Sphinx > conversion that didn't make it.

Re: [PATCH Rust front-end v4 46/46] gccrs: Add README, CONTRIBUTING and compiler logo

2022-12-12 Thread Joseph Myers
On Fri, 9 Dec 2022, Martin Liška wrote: > On 12/6/22 11:14, arthur.co...@embecosm.com wrote: > > |We still need to write out a documentation section, but these READMEs will > > help in the meantime.| > > Hello. > > Just a quick comment: The Sphinx conversion didn't make it for all GCC >

[committed] c: Diagnose auto constexpr used with a type

2022-12-07 Thread Joseph Myers
The constraints on auto in C2x disallow use with other storage-class specifiers unless the type is inferred from an initializer. That includes constexpr; add the missing checks for this case (the combination of auto, constexpr and a type specifier). Bootstrapped with no regressions for

[committed] testsuite: Add test for C90 auto with implicit int

2022-12-07 Thread Joseph Myers
Add a test for the case of auto with implicit int in C90 mode, which is incompatible with C2x semantics (I missed adding such a test when implementing C2x auto). Tested for x86_64-pc-linux-gnu. * gcc.dg/c90-auto-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/c90-auto-1.c

[committed] preprocessor: Enable __VA_OPT__ for C2x

2022-12-07 Thread Joseph Myers
C2x supports __VA_OPT__, so adjust libcpp not to pedwarn for uses of it (or of not passing any variable arguments to a variable-arguments macro) in standard C2x mode. I didn't try to duplicate existing tests for the details of the feature, just verified -pedantic-errors handling is as expected.

Re: [PATCH] libcpp: suppress builtin macro redefined warnings for __LINE__

2022-12-01 Thread Joseph Myers
On Fri, 2 Dec 2022, Longjun Luo via Gcc-patches wrote: > They are ./gcc/testsuite/gcc.dg/cpp/warn-redefined.c and > ./gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c > > These two cases redefine the __TIME__ macro when using the option > '-Wbuiltin-macro-redefined'. > > I think I shoud add a test

Re: [PATCH] libcpp: suppress builtin macro redefined warnings for __LINE__

2022-12-01 Thread Joseph Myers
On Fri, 2 Dec 2022, Longjun Luo via Gcc-patches wrote: > > On 12/2/2022 1:01 AM, Joseph Myers wrote: > > On Thu, 1 Dec 2022, Longjun Luo via Gcc-patches wrote: > > > > > diff --git a/gcc/testsuite/gcc.dg/builtin-redefine.c > > > b/gcc/testsuite/gcc.dg/builti

Re: [PATCH] libcpp: suppress builtin macro redefined warnings for __LINE__

2022-12-01 Thread Joseph Myers
On Thu, 1 Dec 2022, Longjun Luo via Gcc-patches wrote: > diff --git a/gcc/testsuite/gcc.dg/builtin-redefine.c > b/gcc/testsuite/gcc.dg/builtin-redefine.c > index 882b2210992..9d5b42252ee 100644 > --- a/gcc/testsuite/gcc.dg/builtin-redefine.c > +++ b/gcc/testsuite/gcc.dg/builtin-redefine.c > @@

Re: Java front-end and library patches.

2022-11-30 Thread Joseph Myers
On Wed, 30 Nov 2022, Zopolis0 via Gcc-patches wrote: > > * Each patch should have its own explanation of what it is doing and why, > > in the message body (not in an attachment). Just the commit summary line > > and ChangeLog entries aren't enough, we need the actual substantive commit > >

Re: Java front-end and library patches.

2022-11-28 Thread Joseph Myers
On Fri, 25 Nov 2022, Zopolis0 via Gcc-patches wrote: > Firstly, to get feedback and reviews on the 56 already existing > patches, even though most are just re-adding code or making idiomatic > changes, so that when the final issue is solved everything has already > been approved (hopefully) and

Re: [PATCH] c: Fix compile time hog in c_genericize [PR107127]

2022-11-23 Thread Joseph Myers
On Wed, 23 Nov 2022, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The complex multiplications result in deeply nested set of many SAVE_EXPRs, > which takes even on fast machines over 5 minutes to walk. > This patch fixes that by using walk_tree_without_duplicates where it is > instant. > >

Re: [PATCH] c: Propagate erroneous types to declaration specifiers [PR107805]

2022-11-22 Thread Joseph Myers
On Tue, 22 Nov 2022, Florian Weimer via Gcc-patches wrote: > Without this change, finish_declspecs cannot tell that whether there > was an erroneous type specified, or no type at all. This may result > in additional diagnostics for implicit ints, or missing diagnostics > for multiple types. > >

Re: [PATCH] range-op: Implement floating point division fold_range [PR107569]

2022-11-22 Thread Joseph Myers
On Tue, 22 Nov 2022, Jan-Benedict Glaw wrote: > I'm running a slightly hacked [glibc]/scripts/build-many-glibcs.py to > to CI builds for glibc as well by now (hacked to allow for GCC master > being used) and this GCC commit > (2d5c4a16dd833aa083f13dd3e78e3ef38afe6ebb) triggers glibc's >

Re: [PATCH] [range-ops] Implement sqrt.

2022-11-17 Thread Joseph Myers
On Thu, 17 Nov 2022, Jakub Jelinek via Gcc-patches wrote: > On Thu, Nov 17, 2022 at 06:59:45PM +0000, Joseph Myers wrote: > > On Thu, 17 Nov 2022, Aldy Hernandez via Gcc-patches wrote: > > > > > So... is the optimization wrong? Are we not allowed to substitute > &

Re: [PATCH] [range-ops] Implement sqrt.

2022-11-17 Thread Joseph Myers
On Thu, 17 Nov 2022, Aldy Hernandez via Gcc-patches wrote: > So... is the optimization wrong? Are we not allowed to substitute > that NAN if we know it's gonna happen? Should we also allow F F F F F > in the test? Or something else? This seems like the usual ambiguity about what

[committed] wwwdocs: gcc-13: Add release notes for more C23 features

2022-11-14 Thread Joseph Myers
diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html index 41d07e57..d033628b 100644 --- a/htdocs/gcc-13/changes.html +++ b/htdocs/gcc-13/changes.html @@ -112,9 +112,41 @@ a work-in-progress. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm;>N3042,

Re: [PATCH] [range-ops] Implement sqrt.

2022-11-14 Thread Joseph Myers
On Sun, 13 Nov 2022, Jakub Jelinek via Gcc-patches wrote: > So, I wonder if we don't need to add a target hook where targets will be > able to provide upper bound on error for floating point functions for > different floating point modes and some way to signal unknown accuracy/can't > be trusted,

Re: [PATCH 1/5] c: Set the locus of the function result decl

2022-11-14 Thread Joseph Myers
On Sun, 13 Nov 2022, Bernhard Reutner-Fischer via Gcc-patches wrote: > Bootstrapped and regtested on x86_86-unknown-linux with no regressions. > Ok for trunk? > > Cc: Joseph Myers > --- > gcc/c/ChangeLog: > > * c-decl.cc (start_function): Set the result decl

ginclude: C2x header version macros

2022-11-12 Thread Joseph Myers
C2x adds __STDC_VERSION_*_H__ macros to individual headers with interface changes compared to C17. All the new header features in headers provided by GCC have now been implemented, so define those macros to the value given in the current working draft. Bootstrapped with no regressions for

c: C2x constexpr

2022-11-11 Thread Joseph Myers
[Global / middle-end reviewers, note there is a dfp.cc change here that needs review.] Implement C2x constexpr (a feature based on the C++ one but much more minimal, with only constexpr variables, not functions). I believe this implementation is fully functional for use of this feature.

Re: old install to a different folder

2022-11-11 Thread Joseph Myers
On Fri, 11 Nov 2022, Tobias Burnus wrote: > For /onlinedocs/, I concur that we want to have the old doc there as there are > many > deep links. Still, we should consider adding a disclaimer box to all former > mainline > documentation stating that this data is no longer updated + point to the new

Re: [PATCH v2 2/4] LoongArch: Add ftint{,rm,rp}.{w,l}.{s,d} instructions

2022-11-10 Thread Joseph Myers
On Thu, 10 Nov 2022, Xi Ruoyao via Gcc-patches wrote: > Joseph: can you confirm that -ftrapping-math allows floor and ceil to > raise inexact exception? The man page currently says: > > The default is -ffp-int-builtin-inexact, allowing the exception to be > raised, unless C2X or a later C

Re: [PATCH] c-family: Support #pragma region/endregion [PR85487]

2022-11-10 Thread Joseph Myers
On Thu, 10 Nov 2022, Jonathan Wakely via Gcc-patches wrote: > Something similar has been proposed before, but didn't get approval. > Jeff wanted a more general framework for ignoring pragmas. It might make > sense to do that, and reuse it for the Darwin-specific 'mark' pragmas. > But as I said in

Re: [RFC] docs: remove documentation for unsupported releases

2022-11-09 Thread Joseph Myers
On Wed, 9 Nov 2022, Michael Matz via Gcc-patches wrote: > I think everything that's on the web server (even the 2.95 docu) has to be > reachable via a (reasonable) set of clicks from the main index.html. It > doesn't need to be _directly_ from the main index.html, though. > > Also, you simply

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-11-09 Thread Joseph Myers
On Wed, 9 Nov 2022, Martin Liška wrote: > 1) not synchronized content among lib*/Makefile.in and lib*/Makefile.am. > Apparently, I modified the generated Makefile.in file with the rules like: > > doc/info/texinfo/libitm.info: $(SPHINX_FILES) > + if [ x$(HAS_SPHINX_BUILD) =

Re: Announcement: Porting the Docs to Sphinx - tomorrow

2022-11-09 Thread Joseph Myers
On Wed, 9 Nov 2022, Richard Biener via Gcc wrote: > I'd say that doing a trunk snapshot build every day as CI would be nice, we > can then publish one once a week, skipping days where the build failed. Note that each snapshot should have diffs relative to the previous published snapshot. Not

Re: [PATCH] maintainer-scripts/gcc_release: compress xz in parallel

2022-11-08 Thread Joseph Myers
On Tue, 8 Nov 2022, Xi Ruoyao via Gcc-patches wrote: > I'm wondering if running xz -T0 on different machines (with different > core numbers) may produce different compressed data. The difference can > cause trouble distributing checksums. gcc_release definitely doesn't use any options to make

Re: Announcement: Porting the Docs to Sphinx - tomorrow

2022-11-08 Thread Joseph Myers
On Tue, 8 Nov 2022, Sam James via Gcc wrote: > Yes, please (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899) > even for snapshots? Pretty please? :) I think we want snapshots to come out weekly even if the compiler or documentation build fails, which makes anything involving a build as part

Re: [PATCH] libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc

2022-11-07 Thread Joseph Myers
I've committed this further fix for a syntax error as obvious. libstdc++: Fix syntax error in old-glibc case in floating_from_chars.cc [PR107562] PR libstdc++/107562 * src/c++17/floating_from_chars.cc (from_chars_impl): Fix syntax error. diff --git

Re: [PATCH] libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc

2022-11-07 Thread Joseph Myers
On Mon, 7 Nov 2022, Jonathan Wakely wrote: > This seems to "fix" it (not sure if it's right though): > > #ifndef _GLIBCXX_HAVE_FLOAT128_MATH > extern "C" _Float128 __strtof128(const char*, char**) > __attribute__((__weak__)); > #endif > extern "C" _Float128 __strtof128(const char*, char**) >

Re: [PATCH] libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc

2022-11-07 Thread Joseph Myers
On Wed, 2 Nov 2022, Jakub Jelinek via Gcc-patches wrote: > APIs. So that one can build gcc against older glibc and then compile > user programs on newer glibc, the patch uses weak references unless > gcc is compiled against glibc 2.26+. strfromf128 unfortunately can't This support for older

[committed] c: C2x auto

2022-11-02 Thread Joseph Myers
Implement C2x auto, a more restricted version of the C++ feature (closer to GNU C __auto_type in terms of what's supported). Since the feature is very close to GNU C __auto_type, much of the implementation can be shared. The main differences are: * Any prior declaration of the identifier in an

Re: [PATCH] genmultilib: Add sanity check

2022-11-02 Thread Joseph Myers
On Wed, 2 Nov 2022, Christophe Lyon via Gcc-patches wrote: > +# Sanity check: make sure we have as many dirnames as options > +if [ -n "${dirnames}" ]; then > +options_arr=($options) This is an sh script; arrays are a bash feature. Building GCC isn't supposed to need bash (or to rely on

Re: [PATCH] Add __builtin_iseqsig()

2022-10-31 Thread Joseph Myers
On Mon, 31 Oct 2022, FX via Gcc-patches wrote: > - rounded conversions: converting, from an integer or floating point > type, into another floating point type, with specific rounding mode > passed as argument These don't have standard C names. The way to do these in C would be using the

Re: [PATCH] Add __builtin_iseqsig()

2022-10-31 Thread Joseph Myers
On Fri, 28 Oct 2022, Jeff Law via Gcc-patches wrote: > Joseph, do you have bits in this space that are going to be landing soon, or > is your C2X work focused elsewhere?  Are there other C2X routines we need to > be proving builtins for? I don't have any builtins work planned for GCC 13 (maybe

[committed] c: C2x enums with fixed underlying type [PR61469]

2022-10-27 Thread Joseph Myers
C2x adds support for enums with a fixed underlying type specified ("enum e : long long;" and similar). Implement this in the C front end. The same representation is used for these types as in C++, with two macros moved from cp-tree.h to c-common.h. Such enums can have bool as the underlying

Re: [PING] options: Clarify 'Init' option property usage for streaming optimization (was: [PATCH] options, lto: Optimize streaming of optimization nodes)

2022-10-26 Thread Joseph Myers
On Wed, 26 Oct 2022, Thomas Schwinge wrote: > Hi! > > Ping. For convenience, I've re-attached > "options: Clarify 'Init' option property usage for streaming optimization". > (I've re-verified: "No functional change; no change in generated files.") OK. -- Joseph S. Myers

Re: c: tree: target: C2x (...) function prototypes and va_start relaxation

2022-10-25 Thread Joseph Myers
On Tue, 25 Oct 2022, Richard Biener wrote: > You are missing to stream the new type flag in tree-streamer-{in,out}.cc > and checking for tree merging in lto-common.cc:compare_tree_sccs_1 > > Otherwise looks reasonable. Can you add a (multi TU) runtime testcase to the > torture exercising the

Re: Ping (c,c++): Handling of main() function for freestanding

2022-10-21 Thread Joseph Myers
On Fri, 21 Oct 2022, Arsen Arsenović via Gcc wrote: > Ping on this patch. > > https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603574.html > > For context, see the rest of this thread. TL;DR is that `int main' > should implicitly return 0 on freestanding, without the other burdens of >

c: tree: target: C2x (...) function prototypes and va_start relaxation

2022-10-21 Thread Joseph Myers
C2x allows function prototypes to be given as (...), a prototype meaning a variable-argument function with no named arguments. To allow such functions to access their arguments, requirements for va_start calls are relaxed so it ignores all but its first argument (i.e. subsequent arguments, if

Re: [PATCH v4] testsuite: Sanitize fails for SP FPU on Arm

2022-10-20 Thread Joseph Myers
On Wed, 19 Oct 2022, Torbjörn SVENSSON via Gcc-patches wrote: > This patch stops reporting fails for Arm targets with single > precision floating point unit for types wider than 32 bits (the width > of float on arm-none-eabi). > > As reported in PR102017, fenv is reported as supported in recent

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-20 Thread Joseph Myers
On Thu, 20 Oct 2022, Martin Liška wrote: > > Also, but not strictly part of the release issue: > > > > (d) Builds with missing or old Sphinx should work regardless of whether > > such files are in the source directory - but if they aren't in the source > > directory, the effect of missing or

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-20 Thread Joseph Myers
On Thu, 20 Oct 2022, Martin Liška wrote: > > Could generated man and info pages be provided as a tarball on > > gcc.gnu.org or ftp.gnu.org? > > Not planning doing that. Release tarballs (but not snapshots) currently include the info files and man pages, via gcc_release running a build with

[committed] c: C2x %wN, %wfN format checking

2022-10-19 Thread Joseph Myers
C2x adds printf and scanf wN and wfN length modifiers (wN for int_leastN_t / uint_leastN_t, also usable for intN_t and uintN_t which are now required to be the same type as the "least" versions when both are supported; wfN for int_fastN_t / uint_fastN_t). Add corresponding format checking support

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Joseph Myers
On Wed, 19 Oct 2022, Martin Liška wrote: > > Currently, there is a tarball with texinfo sources for all the manuals > > for each version. > > Well, then equivalent would be packaging all .rst files together with the > corresponding > conf.py, logo.* and other files. But I don't see it much

Re: [PATCH] testsuite: Fix up c2x-enum-1.c for 32-bit arches [PR107311]

2022-10-19 Thread Joseph Myers
On Wed, 19 Oct 2022, Jakub Jelinek wrote: > Hi! > > On Wed, Oct 19, 2022 at 02:57:59PM +0000, Joseph Myers wrote: > > I think the type checked for e5a should be conditional on __LONG_MAX__ > > > __INT_MAX__; everything else there should be OK regardless. > > So

Re: [committed] c: C2x enums wider than int [PR36113]

2022-10-19 Thread Joseph Myers
On Wed, 19 Oct 2022, Jakub Jelinek wrote: > > +/* Likewise, for overflow from long to long long. */ > > +#if __LONG_LONG_MAX__ > __LONG_MAX__ > > +enum e5 { e5a = __LONG_MAX__, > > + e5b, e5c, e5d = ((typeof (e5b)) -1) < 0, > > + e5e = (unsigned long) -1, > > + e5f, e5g = ((typeof

[committed] c: Diagnose "enum tag;" after definition [PR107164]

2022-10-18 Thread Joseph Myers
As noted in bug 101764, a declaration "enum tag;" is invalid in standard C after a definition, as well as when no definition is visible; we had a pedwarn-if-pedantic for the forward declaration case, but were missing one for the other case. Add that missing diagnostic (if pedantic only). (These

[committed] c: C2x enums wider than int [PR36113]

2022-10-18 Thread Joseph Myers
C2x has two enhancements to enumerations: allowing enumerations whose values do not all fit in int (similar to an existing extension), and allowing an underlying type to be specified (as in C++). This patch implements the first of those enhancements. Apart from adjusting diagnostics to reflect

Re: [RFC PATCH] libstdc++, v2: Partial library support for std::float{16, 32, 64, 128}_t

2022-10-17 Thread Joseph Myers
On Mon, 17 Oct 2022, Jonathan Wakely via Gcc-patches wrote: > > And I/O etc. support is missing, not sure I'm able to handle that and if it > > is e.g. possible to keep that support out of libstdc++.so.6, because what > > extended floating point types one has on a particular arch could change

[committed] preprocessor: C2x identifier rules

2022-10-14 Thread Joseph Myers
C2x has, like C++, adopted rules for identifiers based directly on an unversioned normative reference to Unicode. Make libcpp follow those rules for c2x / gnu2x standards (this involves bringing back a flag separate from the C++ one for whether to use these identifier rules, but this time enabled

[committed] c: C2x storage class specifiers in compound literals

2022-10-13 Thread Joseph Myers
Implement the C2x feature of storage class specifiers in compound literals. Such storage class specifiers (static, register or thread_local; also constexpr, but we don't yet have C2x constexpr support implemented) can be used before the type name (not mixed with type specifiers, unlike in

[committed] c: Do not use *_IS_IEC_60559 == 2

2022-10-12 Thread Joseph Myers
A late change for C2x (addressing comments from the second round of editorial review before the CD ballot, postdating the most recent public working draft) removed the value 2 for *_IS_IEC_60559 (a new macro added in C2x). Adjust the implementation accordingly not to use this value.

Re: [RFC] Add support for vectors in comparisons (like the C++ frontend does)

2022-10-10 Thread Joseph Myers
On Mon, 10 Oct 2022, Paul Iannetta via Gcc-patches wrote: > I have a patch to bring this feature to the C front-end as well, and > would like to hear your opinion on it, especially since it may affect > the feature-set of the objc front-end as well. > Currently, this is only a tentative patch

Re: Patch ping (Re: [PATCH] libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for)

2022-10-06 Thread Joseph Myers
I'm seeing the following build failure for arc-linux-gnu after this commit. (Note that this is for building GCC *after* glibc, not for an initial inhibit_libc bootstrap build of GCC.) In file included from /scratch/jmyers/glibc-bot/src/gcc/libgcc/unwind-dw2.c:413: ./md-unwind-support.h: In

Re: [PATCH] Add __builtin_iseqsig()

2022-10-06 Thread Joseph Myers
My reading of the bug given as a reason for not testing that FE_INVALID is raised for (both quiet and signaling) NaN arguments is that it's specifically about constant arguments. That is, it ought to be possible to have a testcase that verifies FE_INVALID is raised when appropriate (and not

c: C2x typeof

2022-10-05 Thread Joseph Myers
[C++ maintainers / global reviewers, note that there is a C++ front-end change here needing review.] C2x adds typeof as a standard feature. In general this follows existing GNU C semantics very closely, but there are various ways in which the implementation involves more than simply enabling the

Re: [GCC13][Patch][V6][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_array

2022-10-05 Thread Joseph Myers
On Wed, 5 Oct 2022, Qing Zhao via Gcc-patches wrote: > + /* if not the last field, return false. */ Comments should start with an uppercase letter. > + /* if not an array field, return false. */ > + /* if there is a strict_flex_array attribute attached to the field, > + override the

Re: [PATCH v2] testsuite: Sanitize fails for SP FPU on Arm

2022-10-05 Thread Joseph Myers
On Wed, 5 Oct 2022, Torbjörn SVENSSON via Gcc-patches wrote: > -/* These should be defined if and only if signaling NaNs are supported > - for the given types. If the testsuite gains effective-target > - support for targets not supporting signaling NaNs, or not > - supporting them for all

Re: [GCC13][Patch][V5][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_array

2022-10-04 Thread Joseph Myers
On Tue, 4 Oct 2022, Qing Zhao via Gcc-patches wrote: > + { "strict_flex_array", 1, 1, false, false, false, false, > + handle_strict_flex_array_attribute, NULL }, You're not requiring that the attribute be applied to a declaration here. > +static tree >

Re: [PATCH] middle-end, c++, i386, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-10-04 Thread Joseph Myers
On Tue, 4 Oct 2022, Jakub Jelinek via Gcc-patches wrote: > Yet another problem is because I've only enabled the bf16/BF16 suffixes in > C++ because for C it might clash with some later extension. Am I right to > fear about that, or do you think C will never standardize suffixes that > would

[committed] c: Adjust LDBL_EPSILON for C2x for IBM long double

2022-10-03 Thread Joseph Myers
C2x changes the definition of *_EPSILON to apply only to normalized numbers. The effect is that LDBL_EPSILON for IBM long double becomes 0x1p-105L instead of 0x1p-1074L. There is a reasonable case for considering this a defect fix - it originated from the issue reporting process (DR#467),

Re: [RFC PATCH] c++, i386, arm, aarch64, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-09-30 Thread Joseph Myers
On Fri, 30 Sep 2022, Jakub Jelinek via Gcc-patches wrote: > What isn't in the patch but I think we'll need to also change are some > minimal set of __builtin_*bf16 builtins. Seems for _Float16, GCC provides > all the __builtin_*f16 (and for C/ObjC even with *f16 names), but there is > no glibc

[committed] c: C2x noreturn attribute

2022-09-29 Thread Joseph Myers
C2x adds a standard [[noreturn]] attribute (which can also be spelt [[_Noreturn]] for use with ), so allowing non-returning functions to be declared in a manner compatible with C++; the _Noreturn function specifier remains available but is marked obsolescent. Implement this attribute. It's more

Re: [PATCH 1/2] cselib: Keep track of further subvalue relations

2022-09-29 Thread Joseph Myers
This introduces an ICE building libgcc for ia64-linux-gnu. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107088 https://sourceware.org/pipermail/libc-testresults/2022q3/010294.html -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] LoongArch: Libitm add LoongArch support.

2022-09-29 Thread Joseph Myers
On Mon, 26 Sep 2022, Lulu Cheng wrote: > +GTM_longjmp: > +cfi_startproc > +GPR_L $s0, $r5, 3*SZ_GPR > +GPR_L $s1, $r5, 4*SZ_GPR > +GPR_L $s2, $r5, 5*SZ_GPR > +GPR_L $s3, $r5, 6*SZ_GPR > +GPR_L $s4, $r5, 7*SZ_GPR > +GPR_L $s5, $r5,

[committed] testsuite: Add more C2x tests

2022-09-23 Thread Joseph Myers
There are some new requirements in C2x where GCC already behaves as required (for all standard versions), where previous standard versions either had weaker requirements permitting the GCC behavior, or were arguably defective in what they said in that area. Add tests that specifically verify GCC

Re: [PATCH] testsuite: Sanitize fails for SP FPU on Arm

2022-09-22 Thread Joseph Myers
On Thu, 22 Sep 2022, Torbjörn SVENSSON via Gcc-patches wrote: > This patch stops reporting fails for Arm targets with single > precision floating point unit for types wider than 32 bits (the width > of float on arm-none-eabi). > > As reported in PR102017, fenv is reported as supported in recent

float.h: Do not define INFINITY for C2x when infinities not supported

2022-09-14 Thread Joseph Myers
C2x has changed the rules for defining INFINITY in so it is no longer defined when float does not support infinities, instead of being defined to an expression that overflows at translation time. Thus, make the definition conditional on __FLT_HAS_INFINITY__ (this is already inside a

Re: [PATCH] c++: Implement P1467R9 - Extended floating-point types and standard names compiler part except for bfloat16 [PR106652]

2022-09-13 Thread Joseph Myers
On Mon, 12 Sep 2022, Jakub Jelinek via Gcc-patches wrote: > > We don't claim in glibc to support old snapshots from master, so checking > > for __GNUC_PREREQ (13, 0) and failing for such older GCC 13 versions is > > fine. > > Ok, makes sense, especially if it is applied on the glibc side a few

Re: [PATCH] c++: Implement P1467R9 - Extended floating-point types and standard names compiler part except for bfloat16 [PR106652]

2022-09-12 Thread Joseph Myers
On Mon, 12 Sep 2022, Jakub Jelinek via Gcc-patches wrote: > Now, I guess for the fixincludes it could also use > # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) > where earlier GCC 13 snapshots would not be doing the fixincludes, > but the question is what to use

stdatomic.h: Do not define ATOMIC_VAR_INIT for C2x

2022-09-09 Thread Joseph Myers
The macro ATOMIC_VAR_INIT, previously declared obsolete, is removed completely in C2x; disable it for C2x in GCC's implementation. (Although ATOMIC_* are reserved names for this header, disabling the macro for C2x still seems appropriate.) Bootstrapped with no regressions for

Re: [PATCH] amdgcn: Add support for additional natively supported floating-point operations

2022-09-09 Thread Joseph Myers
On Thu, 8 Sep 2022, Kwok Cheung Yeung wrote: > The sin and cos instructions for some reason are scaled by 2*PI radians (i.e. > 1.0 == 2*PI radians/360 degrees), so their inputs need to be scaled by > 1/(2*PI) first. I've implemented this as an expander to two instructions - one C2x has sinpi and

stddef.h: Add C2x unreachable macro

2022-09-08 Thread Joseph Myers
C2x adds a macro unreachable to stddef.h, with the same semantics as __builtin_unreachable. Define this macro accordingly. Bootstrapped with no regressions for x86_64-pc-linux-gnu. OK to commit? gcc/ * ginclude/stddef.h [__STDC_VERSION__ > 201710L] (unreachable): New macro.

c: New C2x keywords

2022-09-06 Thread Joseph Myers
C2x follows C++ in making alignas, alignof, bool, false, static_assert, thread_local and true keywords; implement this accordingly. This implementation makes them normal keywords in C2x mode just like any other keyword (C2x leaves open the possibility of implementation using predefined macros

[committed] preprocessor: Disable trigraphs for C2x

2022-09-05 Thread Joseph Myers
ISO C2x removes trigraphs, so disable them accordingly for -std=c2x (they can still be enabled using -trigraphs). Bootstrapped with no regressions for x86_64-pc-linux-gnu. libcpp/ * init.cc (lang_defaults): Disable trigraphs for C2x. gcc/testsuite/ *

Re: [committed] c: C2x removal of unprototyped functions

2022-09-05 Thread Joseph Myers
On Fri, 2 Sep 2022, Richard Biener via Gcc-patches wrote: > To catch these cases with a diagnostic earlier is > -Wstrict-prototypes -Wold-style-declaration enough to diagnose all cases > that the new standard will reject? I think so. > I suppose -W*-c2x-compat are not the correct vehicle to

[committed] c: C2x removal of unprototyped functions

2022-09-01 Thread Joseph Myers
C2x has completely removed unprototyped functions, so that () now means the same as (void) in both function declarations and definitions, where previously that change had been made for definitions only. Implement this accordingly. This is a change where GNU/Linux distribution builders might wish

Re: [COMMITTED] Implement ranger folder for __builtin_signbit.

2022-09-01 Thread Joseph Myers
On Thu, 1 Sep 2022, Aldy Hernandez via Gcc-patches wrote: > Now that we keep track of the signbit, we can use it to fold > __builtin_signbit. > > I am assuming I don't have try too hard to get the actual signbit > number and 1 will do. Especially, since we're inconsistent in trunk whether > we

[committed] c: C2x attributes fixes and updates

2022-08-31 Thread Joseph Myers
Implement some changes to the currently supported C2x standard attributes that have been made to the specification since they were first implemented in GCC, and some consequent changes: * maybe_unused is now supported on labels. In fact that was already accidentally supported in GCC as a

Re: [[GCC13][Patch][V3] 1/2] Add a new option -fstrict-flex-array[=n] and new attribute strict_flex_array

2022-08-31 Thread Joseph Myers
On Wed, 31 Aug 2022, Qing Zhao wrote: > >> When -std=gnu89 + -fstrict-flex-array=3 (ONLY C99 flexible array member > >> [] is treated as a valid flexible array) present together, > > > > That seems reasonable enough without a warning. If people want a warning > > for flexible array members in

Re: [[GCC13][Patch][V3] 1/2] Add a new option -fstrict-flex-array[=n] and new attribute strict_flex_array

2022-08-31 Thread Joseph Myers
On Wed, 31 Aug 2022, Qing Zhao wrote: > Does the above mean that -std=gnu89 does not support C99 flexible array > member, then No. Flexible array members are supported by GCC in all C standards modes. The C90 standard doesn't support them, but that's irrelevant to what GCC supports; it just

Re: [[GCC13][Patch][V3] 1/2] Add a new option -fstrict-flex-array[=n] and new attribute strict_flex_array

2022-08-31 Thread Joseph Myers
On Wed, 31 Aug 2022, Qing Zhao via Gcc-patches wrote: > > How is level 3 (thus -fstrict-flex-array) interpreted when you specify > > -std=c89? How for -std=gnu89? > > 1. what’s the major difference between -std=c89 and -std=gnu89 on flexible > array? (Checked online, cannot find a concrete

<    1   2   3   4   5   6   7   8   9   10   >