Re: [C PATCH] Fix ICE for composite type for structs with unsigned bitfields [PR113492]

2024-01-20 Thread Joseph Myers
On Sat, 20 Jan 2024, Martin Uecker wrote: > C23: Fix ICE for composite type for structs with unsigned bitfields [PR113492] > > This patch fixes a bug when forming a composite type from structs that > contain an unsigned bitfield declared with int while using > -funsigned-bitfields. > In

Re: [PATCH 01/14] c++: Implement __is_integral built-in trait

2024-01-17 Thread Joseph Myers
On Wed, 17 Jan 2024, Jonathan Wakely wrote: > So we can remove the dependency on __STRICT_ISO__ for 128-bit integer > types, and implementing std::is_integral with a built-in seems like > the perfect time to do that. But that seems like stage 1 material, as > we need to go through the library and

Re: [PATCH] c: Avoid _BitInt indexes > sizetype in ARRAY_REFs [PR113315]

2024-01-12 Thread Joseph Myers
On Fri, 12 Jan 2024, Jakub Jelinek wrote: > Hi! > > When build_array_ref doesn't use ARRAY_REF, it casts the index to sizetype > already, performs POINTER_PLUS_EXPR and then dereferences. > While when emitting ARRAY_REF, we try to keep index expression as is in > whatever type it had, which is

Re: [PATCH][frontend]: don't ice with pragma NOVECTOR if loop in C has no condition [PR113267]

2024-01-08 Thread Joseph Myers
On Mon, 8 Jan 2024, Tamar Christina wrote: > Hi All, > > In C you can have loops without a condition, the original version of the patch > was rejecting the use of #pragma GCC novector, however during review it was > changed to not due this with the reason that we didn't want to give a compile >

[committed] steering.html: Update my affiliation

2024-01-08 Thread Joseph Myers
Meteorologisch Instituut) -Joseph Myers (CodeSourcery / Mentor Graphics) [co-Release Manager] +Joseph Myers (Red Hat) [co-Release Manager] Gerald Pfeifer (SUSE) Ramana Radhakrishnan Joel Sherrill (OAR Corporation) -- Joseph S. Myers josmy...@redhat.com

[committed] MAINTAINERS: Update my email address

2024-01-08 Thread Joseph Myers
David S. Miller -Joseph Myers +Joseph Myers Richard Sandiford Bernd Schmidt Ian Lance Taylor

Re: [PATCH 1/4; v4] options: add gcc/regenerate-opt-urls.py

2024-01-02 Thread Joseph Myers
On Tue, 2 Jan 2024, David Malcolm wrote: > > > +#print(f'{url_suffix=} {index_text=}') > > > > Various commented-out or "if 0" debugging code like this should probably > > be removed (or made into an actual runtime conditional if desired). > > I've removed them all. There are still a

[committed] MAINTAINERS: Update my email address

2023-12-29 Thread Joseph Myers
Jason Merrill David S. Miller -Joseph Myers +Joseph Myers Richard Sandiford Bernd Schmidt

Re: [C PATCH] C: Fix type compatibility for structs with variable sized fields.

2023-12-29 Thread Joseph Myers
On Wed, 27 Dec 2023, Martin Uecker wrote: > This patch hopefully fixes the test failure we see with gnu23-tag-4.c. > It does for me locally with -march=native (which otherwise reproduces > the problem). > > Bootstrapped and regession tested on x86_64 > > > C: Fix type compatibility for structs

Re: [V6] c23: construct composite type for tagged types

2023-12-22 Thread Joseph Myers
On Thu, 21 Dec 2023, Martin Uecker wrote: > This version now sets DECL_NONADDRESSABLE_P, DECL_PADDING_P > and C_DECL_VARIABLE_SIZE and adds three new tests: > c23-tag-alias-7.c, c23-tag-composite-10.c, and > gnu23-tag-composite-5.c. This version is OK. -- Joseph S. Myers

Re: [PATCH RFA] opts: -Werror=foo always implies -Wfoo [PR106213]

2023-12-20 Thread Joseph Myers
On Tue, 19 Dec 2023, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, OK for trunk? > > -- 8< -- > > -Werror=foo implying -Wfoo wasn't working for -Wdeprecated-copy-dtor, > because it is specified as the value 2 of warn_deprecated_copy, which shows > up as CLVC_EQUAL, which is not one of the

Re: [pushed][PR112918][LRA]: Fixing IRA ICE on m68k

2023-12-20 Thread Joseph Myers
On Mon, 18 Dec 2023, Jeff Law wrote: > > > On 12/18/23 15:16, Vladimir Makarov wrote: > > The following patch fixes > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112918 > > > > The patch was successfully bootstrapped and tested on x86-64, aarch64, and > > ppc64. > > > > The patch

Re: [PATCH 0/4] v3 of: Option handling: add documentation URLs

2023-12-19 Thread Joseph Myers
On Thu, 14 Dec 2023, David Malcolm wrote: > Are these OK for trunk, assuming I followup with adding CI for this? > (that said, I disappear for the rest of 2023 at the end of this week, so > I'd work on the CI in early January) Patches 2 (updated at the time of commit to reflect the latest

Re: [PATCH 1/4; v3] options: add gcc/regenerate-opt-urls.py

2023-12-19 Thread Joseph Myers
On Thu, 14 Dec 2023, David Malcolm wrote: > diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi > index 26a7e9c35070..9a394b3e2c77 100644 > --- a/gcc/doc/sourcebuild.texi > +++ b/gcc/doc/sourcebuild.texi > @@ -813,6 +813,10 @@ options supported by this target (@pxref{Run-time >

Re: [V5] [C PATCH 4/4] c23: construct composite type for tagged types

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > + tree f = build_decl (input_location, FIELD_DECL, DECL_NAME (a), > +composite_type_internal (ta, tb, cache)); > + > + DECL_PACKED (f) = DECL_PACKED (a); > + SET_DECL_ALIGN (f, DECL_ALIGN

Re: [V5] [C PATCH 3/4] c23: aliasing of compatible tagged types

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > +/* While tese tests check that incompatible definitions > + * of enums can alias. */ s/tese/these/ Patch 3 is OK with that fix. -- Joseph S. Myers jos...@codesourcery.com

Re: [V5] [C PATCH 2/4] c23: tag compatibility rules for enums

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > diff --git a/gcc/testsuite/gcc.dg/c23-tag-enum-1.c > b/gcc/testsuite/gcc.dg/c23-tag-enum-1.c > new file mode 100644 > index 000..a81a5afc456 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/c23-tag-enum-1.c > +void test2(void) > +{ > + enum ee

Re: [V5] [C PATCH 1/4] c23: tag compatibility rules for struct and unions

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > Here is the revised series. The first three patches only > have changes in the tests as well as the return value > changes.   The fourth patch was now also revised, > with changes and tests to make sure that the composite > type works correctly for

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Joseph Myers
On Mon, 18 Dec 2023, Jakub Jelinek wrote: > Hi! > > The following patch changes -Walloc-size warning to no longer warn > about int *p = calloc (1, sizeof (int));, because as discussed earlier, > the size is IMNSHO sufficient in that case, for alloc_size with 2 > arguments warns if the product of

Re: [PATCH v3] libcpp: add function to check XID properties

2023-12-18 Thread Joseph Myers
On Fri, 8 Sep 2023, Arthur Cohen wrote: > + if (c < 0x80) > + { > +if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z')) > + return CPP_XID_START | CPP_XID_CONTINUE; > +if (('0' <= c && c <= '9') || c == '_') > + return CPP_XID_CONTINUE; This may be an artifact of how the patch was

Re: RFC -- targets with unsigned bifields

2023-12-18 Thread Joseph Myers
On Sat, 16 Dec 2023, Jeff Law wrote: > I tracked this down to the port unconditionally adding -funsigned-bitfields to > CC1_SPEC. According to the comment it's how the ABI is defined for the mcore > targets. We explicitly document (under Non-bugs in trouble.texi) that we don't do this, and

Re: [PATCH] c-family: Use -Wdiscarded-qualifiers for ignored qualifiers in __atomic_*

2023-12-18 Thread Joseph Myers
On Sun, 17 Dec 2023, Florian Weimer wrote: > This matches other compiler diagnostics. No test updates are needed > because c-c++-common/pr95378.c does not match a specific -W option. > > Fixes commit d2384b7b24f8557b66f6958a05ea99ff4307e75c ("c-family: > check qualifiers of arguments to

Re: [V4] [PATCH 3/4] c23: aliasing of compatible tagged types

2023-12-14 Thread Joseph Myers
On Mon, 27 Nov 2023, Martin Uecker wrote: > diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h > index a5dd9a37944..ece5b6a5d26 100644 > --- a/gcc/c/c-tree.h > +++ b/gcc/c/c-tree.h > @@ -758,6 +758,7 @@ extern tree require_complete_type (location_t, tree); > extern bool same_translation_unit_p

Re: [V4] [PATCH 2/4] c23: tag compatibility rules for enums

2023-12-14 Thread Joseph Myers
On Mon, 27 Nov 2023, Martin Uecker wrote: > + enum B : short { M = 1 } *y2e = /* { dg-warning "incompatible" > } */ This probably now needs to be dg-error because -Wincompatible-pointer-types is now an error by default. OK with that changed as needed (you may also need such a change

Re: [V4] [C PATCH 1/4] c23: tag compatibility rules for struct and unions

2023-12-14 Thread Joseph Myers
On Mon, 27 Nov 2023, Martin Uecker wrote: > Note that there is an additional change in parser_xref_tag > to address the issue regarding completeness in redefinition > which affects also structs / unions. The test c23-tag-6.c > was changed accordingly. > > > c23: tag compatibility rules for

Re: [PATCH] multiflags: fix doc warning properly

2023-12-12 Thread Joseph Myers
On Mon, 11 Dec 2023, Alexandre Oliva wrote: > On Dec 11, 2023, Joseph Myers wrote: > > > On Fri, 8 Dec 2023, Alexandre Oliva wrote: > >> @@ -20589,7 +20589,7 @@ allocation before or after interprocedural > >> optimization. > >> This option enables

Re: v2 [C PATCH] Fix regression causing ICE for structs with VLAs [PR 112488]

2023-12-11 Thread Joseph Myers
On Sat, 9 Dec 2023, Martin Uecker wrote: > Fix regression causing ICE for structs with VLAs [PR 112488] > > A previous patch the fixed several ICEs related to size expressions > of VM types (PR c/70418, ...) caused a regression for structs where > a DECL_EXPR is not generated anymore although

Re: [PATCH] multiflags: fix doc warning

2023-12-11 Thread Joseph Myers
On Fri, 8 Dec 2023, Alexandre Oliva wrote: > @@ -20589,7 +20589,7 @@ allocation before or after interprocedural > optimization. > This option enables multilib-aware @code{TFLAGS} to be used to build > target libraries with options different from those the compiler is > configured to use by

Re: [gcc15] nested functions in C

2023-12-05 Thread Joseph Myers
On Mon, 4 Dec 2023, Martin Uecker wrote: > > The key feature of lambdas (which failed to make it into C23) for this > > purpose is that you can't convert them to function pointers, which > > eliminates any need for trampolines. > > And also makes them useful only for template-like macro

Re: [PATCH] htdocs/git.html: correct spelling and use git in example

2023-12-04 Thread Joseph Myers
On Fri, 1 Dec 2023, Jonny Grant wrote: > > > On 30/11/2023 23:56, Joseph Myers wrote: > > On Thu, 30 Nov 2023, Jonny Grant wrote: > > > >> ChangeLog: > >> > >>htdocs/git.html: change example to use git:// and correct > >>

Re: [PATCH] c/86869 - preserve address-space info when building qualified ARRAY_TYPE

2023-12-04 Thread Joseph Myers
On Mon, 4 Dec 2023, Richard Biener wrote: > The following adjusts the C FE specific qualified type building > to preserve address-space info also for ARRAY_TYPE. > > Bootstrap / regtest running on x86_64-unknown-linux-gnu, OK? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [gcc15] nested functions in C

2023-12-04 Thread Joseph Myers
On Mon, 4 Dec 2023, Siddhesh Poyarekar wrote: > On 2023-12-04 13:48, Martin Uecker wrote: > > > I empathize with Jakub's stated use case though of keeping the C > > > frontend support for testing purposes, but that could easily be done > > > behind a flag, or by putting nested C func deprecation

Re: [PATCH] c/89270 - honor registered_builtin_types in type_for_size

2023-12-04 Thread Joseph Myers
On Mon, 4 Dec 2023, Richard Biener wrote: > The following fixes the intermediate conversions inserted by > convert_to_integer when facing address-spaces and converts > to their effective [u]intptr_t when they are registered_builtin_types > by considering those also from c_common_type_for_size and

Re: [PATCH] htdocs/git.html: correct spelling and use git in example

2023-11-30 Thread Joseph Myers
On Thu, 30 Nov 2023, Jonny Grant wrote: > ChangeLog: > > htdocs/git.html: change example to use git:// and correct > spelling repostiory -> repository . git:// (unencrypted / unauthenticated) is pretty widely considered obsolescent, I'm not sure adding a use of it

Re: [PATCH] s390: implement flags output

2023-11-28 Thread Joseph Myers
This has introduced an ICE building glibc for s390x-linux-gnu. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112753 -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] libcpp: Fix unsigned promotion for unevaluated divide by zero [PR112701]

2023-11-27 Thread Joseph Myers
On Mon, 27 Nov 2023, Lewis Hyatt wrote: > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112701 > > Here is a one-line fix to an edge case in libcpp's expression evaluator > noted in the PR. Bootstrap + regtest all languages on x86-64 Linux. Is it OK > please? Thanks! OK. -- Joseph

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-27 Thread Joseph Myers
On Sun, 26 Nov 2023, Martin Uecker wrote: > My understand is that it is used for aliasing analysis and also > checking of conversions. TYPE_CANONICAL must be consistent with > the idea the middle-end has about type conversions. But as long > as we do not give the same TYPE_CANONICAL to types

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

2023-11-27 Thread Joseph Myers
On Sat, 25 Nov 2023, Gerald Pfeifer wrote: > On Fri, 21 Oct 2022, Joseph Myers wrote: > > C2x allows function prototypes to be given as (...), a prototype > > meaning a variable-argument function with no named arguments. > > I noticed this did not make it int

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-23 Thread Joseph Myers
On Thu, 16 Nov 2023, Martin Uecker wrote: > Tell the backend which types are equivalent by setting > TYPE_CANONICAL to one struct in the set of equivalent > structs. Structs are considered equivalent by ignoring > all sizes of arrays nested in types below field level. Is TYPE_CANONICAL *only*

Re: [PATCH 2/4] c23: tag compatibility rules for enums

2023-11-23 Thread Joseph Myers
On Thu, 16 Nov 2023, Martin Uecker wrote: > +enum tt { R = 2 } TT; > +enum tt { > + R = _Generic(, enum tt*: 0, default: 2) > +}; > +// incomplete during construction > + > +enum A { B = 7 } y; > +enum A { B = 7 }; > + > +enum A { B = _Generic(, enum A*: 1, default: 7) }; I don't follow the

Re: [PATCH 1/4] c23: tag compatibility rules for struct and unions

2023-11-23 Thread Joseph Myers
On Thu, 16 Nov 2023, Martin Uecker wrote: > * c-decl.cc (previous_tag): New function. > (get_parm_info): Turn off warning for C2X. C23 now, not C2X. > (comptypes_internal): Activate comparison of tagged > types (convert_for_assignment): Ingore qualifiers. This still has

Re: [PATCH v3 1/5] LoongArch: Fix usage of LSX and LASX frint/ftint instructions [PR112578]

2023-11-23 Thread Joseph Myers
On Thu, 23 Nov 2023, Xi Ruoyao wrote: > Indeed... It seems the FE will only generate __builtin_irintf when - > fno-math-errno -funsafe-math-optimizations. > > But I cannot see why this is necessary (at least for us): the rintf > function does not set errno at all, and to me using vftint.w.s

Re: [PATCH v3 02/11] aarch64: Call named function in gcc.target/aarch64/aapcs64/ice_1.c

2023-11-22 Thread Joseph Myers
On Mon, 20 Nov 2023, Florian Weimer wrote: > This test looks like it intends to pass a small struct argument > through both a non-variadic and variadic argument, but due to > the typo, it does not achieve that. > > gcc/testsuite/ > > * gcc.target/aarch64/aapcs64/ice_1.c (foo): Call named.

Re: [PATCH] c: Add __builtin_stdc_bit_{width,floor,ceil} builtins

2023-11-22 Thread Joseph Myers
On Mon, 20 Nov 2023, Jakub Jelinek wrote: > On Mon, Nov 20, 2023 at 04:03:07PM +0100, Jakub Jelinek wrote: > > > Note that stdc_bit_ceil now has defined behavior (return 0) on overflow: > > > CD2 comment FR-135 was accepted for the DIS at the June WG14 meeting. > > > This affects both the

Re: [PATCH v5] Introduce attribute sym_alias

2023-11-22 Thread Joseph Myers
Is it OK to apply this attribute to a (file-scope or block-scope) static variable or function in C (and if it is, what's the linkage of the resulting alias)? That doesn't seem very clear to me from the documentation, and I'd also expect a testcase of this, whatever the answer is. What's the

Re: [PATCH v3 01/11] aarch64: Avoid -Wincompatible-pointer-types warning in Linux unwinder

2023-11-22 Thread Joseph Myers
On Mon, 20 Nov 2023, Florian Weimer wrote: > * config/aarch64/linux-unwind.h > (aarch64_fallback_frame_state): Add cast to the expected type > in sc assignment. OK in the absence of AArch64 maintainer objections within 48 hours. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH v3 03/11] gm2: Add missing declaration of m2pim_M2RTS_Terminate to test

2023-11-22 Thread Joseph Myers
On Mon, 20 Nov 2023, Florian Weimer wrote: > gcc/testsuite/ > > * gm2/link/externalscaffold/pass/scaffold.c (m2pim_M2RTS_Terminate): > Declare. OK in the absence of Modula-2 maintainer objections within 48 hours. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 2/2] bugzilla: remove `gcc-bugs@` mailing list address

2023-11-22 Thread Joseph Myers
On Mon, 20 Nov 2023, Ben Boeckel wrote: > Bugzilla is preferred today. > > ChangeLog: > > * config-ml.in: Replace gcc-bugs@ with Bugzilla link. > * symlink-tree: Replace gcc-bugs@ with Bugzilla link. I don't think we should use a URL that redirects (i.e.

Re: [PATCH] gcc.misc-tests/linkage-y.c: Compatibility with C99+ system compilers

2023-11-21 Thread Joseph Myers
On Tue, 21 Nov 2023, Florian Weimer wrote: > This program is compiled with an installed "cc" compiler, not the > built GCC compiler, so it should be as compatible as possible across a > wide range of compilers. > > gcc/testsuite/ > > * gcc.misc-tests/linkage-y.c (puts): Declare. >

Re: [PATCH 0/4] v2 of Option handling: add documentation URLs

2023-11-21 Thread Joseph Myers
On Tue, 21 Nov 2023, Tobias Burnus wrote: > On 21.11.23 14:57, David Malcolm wrote: > > On Tue, 2023-11-21 at 02:09 +0100, Hans-Peter Nilsson wrote: > > > Sorry for barging in though I did try finding the relevant > > > discussion, but is committing this generated stuff necessary? > > > Is it

Re: [PATCH] c: Add __builtin_stdc_bit_{width,floor,ceil} builtins

2023-11-21 Thread Joseph Myers
On Mon, 20 Nov 2023, Jakub Jelinek wrote: > > Note that stdc_bit_ceil now has defined behavior (return 0) on overflow: > > CD2 comment FR-135 was accepted for the DIS at the June WG14 meeting. > > This affects both the documentation and the implementation, as they need > > to avoid an

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Joseph Myers
On Mon, 20 Nov 2023, Jakub Jelinek wrote: > and be done with that. If there is an agreement we should do that > for all 14 rather than just those 3 + the 2 ugly hacks (__builtin_c{l,t}zg > with > 0ULL second argument and __builtin_bit_complement), I can change the I tend to agree with the

Re: [PATCH v2 2/6] LoongArch: genopts: Add infrastructure to generate code for new features in ISA evolution

2023-11-20 Thread Joseph Myers
On Sat, 18 Nov 2023, Xi Ruoyao wrote: > diff --git a/gcc/config/loongarch/loongarch-def.h > b/gcc/config/loongarch/loongarch-def.h > index b319cded456..6123c8e0f19 100644 > --- a/gcc/config/loongarch/loongarch-def.h > +++ b/gcc/config/loongarch/loongarch-def.h > @@ -46,6 +46,7 @@ along with GCC;

Re: [PATCH] c: Add __builtin_stdc_bit_{width,floor,ceil} builtins

2023-11-20 Thread Joseph Myers
On Sat, 18 Nov 2023, Jakub Jelinek wrote: > +@defbuiltin{@var{type} __builtin_stdc_bit_ceil (@var{type} @var{arg})} > +The @code{__builtin_stdc_bit_ceil} function is available only > +in C. It is type-generic, the argument can be any unsigned integer > +(standard, extended or bit-precise). No

Re: [PATCH] c, c++: Add new value for vector types for __builtin_classify_type (type)

2023-11-16 Thread Joseph Myers
On Thu, 16 Nov 2023, Jason Merrill wrote: > On 11/11/23 03:22, Jakub Jelinek wrote: > > Hi! > > > > While filing a clang request to return 18 on _BitInts for > > __builtin_classify_type instead of -1 they return currently, I've > > noticed that we return -1 for vector types. I'm not convinced

Re: [PATCH 0/3] Option handling: add documentation URLs

2023-11-15 Thread Joseph Myers
On Wed, 15 Nov 2023, David Malcolm wrote: > As mentioned, I'm currently investigating capturing per-language option > URLs (to address Iain's and Marc's comments about D and Ada); if I get > that working, I may need to add a similar note for adding a new > frontend. > > Hope the overall approach

Re: [PATCH 2/4] c-family, C: handle clang attributes [PR109877].

2023-11-13 Thread Joseph Myers
On Sun, 12 Nov 2023, Iain Sandoe wrote: > This adds the ability to defer the validation of numeric attribute > arguments until the sequence is parsed if the attribute being > handled is one known to be 'clang form'. This is only for __attribute__ and not [[]]-style attributes, is that as

Re: [PATCH] c-family: Let libcpp know when the compilation is for a PCH [PR9471]

2023-11-13 Thread Joseph Myers
On Fri, 10 Nov 2023, Lewis Hyatt wrote: > Hello- > > The PR may be 20 years old, but by now it only needs a one-line fix :). Is > it OK please? Bootstrapped + regtested all langauges on x86-64 Linux. > Thanks! OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 4/4] maintainer-scripts/gcc_release: cleanup whitespace

2023-11-13 Thread Joseph Myers
On Fri, 10 Nov 2023, Sam James wrote: > Joseph Myers writes: > > > On Thu, 2 Nov 2023, Sam James wrote: > > > >> maintainer-scripts/ > >>* gcc_release: Cleanup whitespace. > > > > OK. > > Thanks. Would you mind pushing

Re: [PATCH 0/3] Option handling: add documentation URLs

2023-11-13 Thread Joseph Myers
On Fri, 10 Nov 2023, David Malcolm wrote: > The .opt.urls files it generates become part of the source tree, and > would be regenerated by maintainers whenever new options are added. > Forgetting to update the files (or not having Python 3 handy) merely > means that URLs might be missing or out

Re: [PATCH] Add type-generic clz/ctz/clrsb/ffs/parity/popcount builtins [PR111309]

2023-11-13 Thread Joseph Myers
On Fri, 10 Nov 2023, Jakub Jelinek wrote: > > Besides the above question I'd say OK (I assume Josephs reply is a > > general ack from his side). > > Joseph, what are your thoughts on the above? It's correct not to promote, since that matches the semantics of the standard type-generic macros.

Re: [PATCH] Add type-generic clz/ctz/clrsb/ffs/parity/popcount builtins [PR111309]

2023-11-09 Thread Joseph Myers
On Thu, 9 Nov 2023, Jakub Jelinek wrote: > The main reason to add these is to support arbitrary unsigned (for > clrsb/ffs signed) bit-precise integer types and also __int128 which > wasn't supported by the existing builtins, so that e.g. > type-generic functions could then support not just

Re: [PATCH v2] c: Add -Wreturn-mismatch warning, split from -Wreturn-type

2023-11-08 Thread Joseph Myers
On Wed, 8 Nov 2023, Florian Weimer wrote: > > v2: Update comment in gcc.dg/noncompile/pr55976-2.c. Do not produce > > an error in C90 pedantic-error mode for return; in a function > > returning non-void. Add gcc.dg/Wreturn-mismatch-6.c to demonstrate > > this behavior. > > Ping?

Re: [PATCH] libgcc: Add {unsigned , }__int128 <-> _Decimal{32, 64, 128} conversion support [PR65833]

2023-11-08 Thread Joseph Myers
On Wed, 8 Nov 2023, Jakub Jelinek wrote: > Hi! > > The following patch adds the missing > {unsigned ,}__int128 <-> _Decimal{32,64,128} > conversion support into libgcc.a on top of the _BitInt support > (doing it without that would be larger amount of code and I hope all > the targets which

[committed] testsuite: Rename c2x-*, gnu2x-* tests to c23-*, gnu23-*

2023-11-07 Thread Joseph Myers
Completing the move to refer to C23 in place of C2X, rename all tests with "c2x" or "gnu2x" in their names to use "c23" or "gnu23" instead. 17 files in the testsuite that referred to such tests (or, in one case, a generated .i file to be scanned) by those names are updated for the renaming.

Re: [C PATCH 6/6] c23: construct composite type for tagged types

2023-11-07 Thread Joseph Myers
On Sat, 26 Aug 2023, Martin Uecker via Gcc-patches wrote: > @@ -501,9 +510,61 @@ composite_type (tree t1, tree t2) > return build_type_attribute_variant (t1, attributes); >} > > -case ENUMERAL_TYPE: > case RECORD_TYPE: > case UNION_TYPE: > + if (flag_isoc2x &&

Re: [C PATCH 4/6] c23: tag compatibility rules for enums

2023-11-07 Thread Joseph Myers
On Sat, 26 Aug 2023, Martin Uecker via Gcc-patches wrote: > Allow redefinition of enum types and enumerators. > > gcc/c: > * c-decl.cc (start_num): Allow redefinition. start_enum not start_num. > @@ -9606,9 +9624,15 @@ start_enum (location_t loc, struct c_enum_contents > *the_enum, tree

Re: [C PATCH 3/6] c23: tag compatibility rules for struct and unions

2023-11-07 Thread Joseph Myers
On Sat, 26 Aug 2023, Martin Uecker via Gcc-patches wrote: > types (convert_for_assignment): Ingore qualifiers. "Ignore". > @@ -1993,6 +1993,24 @@ locate_old_decl (tree decl) > decl, TREE_TYPE (decl)); > } > > +static tree > +previous_tag (tree type) This function needs a

Re: [C PATCH 2/6] c23: recursive type checking of tagged type

2023-11-07 Thread Joseph Myers
On Sat, 26 Aug 2023, Martin Uecker via Gcc-patches wrote: > Adapt the old and unused code for type checking for C23. > > gcc/c/: > * c-typeck.c (struct comptypes_data): Add anon_field flag. > (comptypes, comptypes_check_unum_int, > comptypes_check_different_types): Remove old

Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-11-07 Thread Joseph Myers
I'm seeing build failures "make[5]: *** No rule to make target 'target-indirect.c', needed by 'target-indirect.lo'. Stop." for many targets in my glibc bot. https://sourceware.org/pipermail/libc-testresults/2023q4/012061.html FAIL: compilers-arc-linux-gnu gcc build FAIL:

Re: [PATCH v3] c-family: Enable -fpermissive for C and ObjC

2023-11-07 Thread Joseph Myers
On Tue, 7 Nov 2023, Florian Weimer wrote: > Future changes will treat some C front end warnings similar to > -Wnarrowing. > > gcc/ > > * doc/invoke.texi (Warning Options): Mention C diagnostics > for -fpermissive. > > gcc/c-family/ > > * c.opt (fpermissive): Enable for C and

[committed] c: Change T2X_* format checking macros to T23_*

2023-11-07 Thread Joseph Myers
Analogous to previous changes to code that matched "c2x" (case-insensitive), also update T2X_* macros used in format checking tables to be named T23_*. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/c-family/ * c-format.h (T2X_UI): Rename to T23_UI. (T2X_UL):

c: Refer more consistently to C23 not C2X

2023-11-06 Thread Joseph Myers
Continuing the move to refer to C23 in place of C2X throughout the source tree, update documentation, diagnostics, comments, variable and function names, etc., to use the C23 name. Testsuite updates are left for a future patch, except for testcases that test diagnostics that previously mentioned

[committed] c: Add -std=c23, -std=gnu23, -Wc11-c23-compat options [PR107954]

2023-11-06 Thread Joseph Myers
At the June WG14 meeting, WG14 decided it preferred to keep C23 as the informal name for the next revision of the C standard, despite publication not being before 2024 (publication is due in 2024 whether or not technical changes at the January meeting result in an FDIS ballot being needed). At

Re: [PATCH] [doc] middle-end/112296 - __builtin_constant_p and side-effects

2023-11-03 Thread Joseph Myers
On Fri, 3 Nov 2023, Richard Biener wrote: > The following tries to clarify the __builtin_constant_p documentation, > stating that the argument expression is not evaluated and side-effects > are discarded. I'm struggling to find the correct terms matching > what the C language standard would call

Re: [PATCH 4/4] maintainer-scripts/gcc_release: cleanup whitespace

2023-11-02 Thread Joseph Myers
On Thu, 2 Nov 2023, Sam James wrote: > maintainer-scripts/ > * gcc_release: Cleanup whitespace. OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 3/4] maintainer-scripts/gcc_release: use HTTPS for links

2023-11-02 Thread Joseph Myers
On Thu, 2 Nov 2023, Sam James wrote: > maintainer-scripts/ > * gcc_release: Use HTTPS for links. OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PING] [C PATCH, v2] Add Walloc-size to warn about insufficient size in allocations [PR71219]

2023-11-01 Thread Joseph Myers
On Wed, 1 Nov 2023, Martin Uecker wrote: > Am Dienstag, dem 31.10.2023 um 22:19 + schrieb Joseph Myers: > > On Tue, 31 Oct 2023, Martin Uecker wrote: > > > > > > + if (TREE_CODE (arg) == INTEGER_CST > > > > + &

Re: [PING] [C PATCH, v2] Add Walloc-size to warn about insufficient size in allocations [PR71219]

2023-10-31 Thread Joseph Myers
On Tue, 31 Oct 2023, Martin Uecker wrote: > > + if (TREE_CODE (arg) == INTEGER_CST > > + && tree_int_cst_lt (arg, TYPE_SIZE_UNIT (ttl))) What if TYPE_SIZE_UNIT (ttl) is not an INTEGER_CST? I don't see any tests of the case of assigning to a pointer to a variably sized type.

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-10-31 Thread Joseph Myers
On Tue, 31 Oct 2023, Qing Zhao wrote: > 2.3 A new semantic requirement in the user documentation of "counted_by" > > For the following structure including a FAM with a counted_by attribute: > > struct A > { >size_t size; >char buf[] __attribute__((counted_by(size))); > }; > > for

Re: [RFC PATCH v1] c: Do not warn about external declaration following inline definition

2023-10-30 Thread Joseph Myers
On Mon, 30 Oct 2023, Barnabás Pőcze wrote: > Hi > > > 2023. október 30., hétfő 19:01 keltezéssel, Joseph Myers írta: > > > On Sat, 28 Oct 2023, Barnabás Pőcze wrote: > > > > > An external declaration following an inline definition is not redundant > >

Re: [PATCH] RISC-V: Add vector fmin/fmax expanders.

2023-10-30 Thread Joseph Myers
On Mon, 30 Oct 2023, Robin Dapp wrote: > Hi, > > this patch adds expanders for fmin and fmax and the associated > cond and reduc ones. As per RISC-V V spec 1.0 vfmin/vfmax are > IEEE 754-2008 compliant so that should be ok. Aren't they actually the IEEE 754-2019 operations (with different

Re: [RFC PATCH v1] c: Do not warn about external declaration following inline definition

2023-10-30 Thread Joseph Myers
On Sat, 28 Oct 2023, Barnabás Pőcze wrote: > An external declaration following an inline definition is not redundant > because it forces the compiler to emit an external definition for the > function. > That is, > > inline void f(void) { } > [extern] void f(void); > > should not trigger

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-23 Thread Joseph Myers
On Mon, 23 Oct 2023, Qing Zhao wrote: > I prefer to implement this in gimplification phase since I am more > familiar with the code there.. (I think that implementing it in > gimplification should be very similar as implementing it in FE? Or do I > miss anything here?) > > Joseph, if

Re: [PATCH] C99 testsuite readiness: Compile more tests with -std=gnu89

2023-10-20 Thread Joseph Myers
OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] c: -Wincompatible-pointer-types should cover mismatches in ?:

2023-10-20 Thread Joseph Myers
On Fri, 20 Oct 2023, Florian Weimer wrote: > gcc/c/ > > PR c/109826 > PR other/44209 > * c-typeck.cc (build_conditional_expr): Use > OPT_Wincompatible_pointer_types for pointer mismatches. > Emit location information for the operand. > > gcc/testsuite/ > > *

Re: [PATCH] c: -Wint-conversion should cover pointer/integer mismatches in ?:

2023-10-20 Thread Joseph Myers
On Fri, 20 Oct 2023, Florian Weimer wrote: > gcc/c/ > > PR c/109827 > PR other/44209 > * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion > for pointer/integer mismatch warnings. > > gcc/testsuite/ > > * gcc.dg/Wint-conversion-3.c: New. OK. --

Re: [PATCH] c: Add -Wreturn-mismatch warning, split from -Wreturn-type

2023-10-19 Thread Joseph Myers
On Thu, 19 Oct 2023, Florian Weimer wrote: > diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc > index 6e044b4afbc..1da622160a3 100644 > --- a/gcc/c/c-typeck.cc > +++ b/gcc/c/c-typeck.cc > @@ -11281,17 +11281,10 @@ c_finish_return (location_t loc, tree retval, tree > origtype) >if

Re: [PATCH 1/2] Fix ICE due to c_safe_arg_type_equiv_p not checking for error_mark node

2023-10-16 Thread Joseph Myers
On Sat, 14 Oct 2023, Andrew Pinski wrote: > This is a simple error recovery issue when c_safe_arg_type_equiv_p > was added in r8-5312-gc65e18d3331aa999. The issue is that after > an error, an argument type (of a function type) might turn > into an error mark node and c_safe_arg_type_equiv_p was

Re: [PATCH 2/2] [c] Fix PR 101364: ICE after error due to diagnose_arglist_conflict not checking for error

2023-10-16 Thread Joseph Myers
On Sat, 14 Oct 2023, Andrew Pinski wrote: > When checking to see if we have a function declaration has a conflict due to > promotations, there is no test to see if the type was an error mark and then > calls > c_type_promotes_to. c_type_promotes_to is not ready for error_mark and causes > an >

Re: [C PATCH] error for function with external and internal linkage [PR111708]

2023-10-16 Thread Joseph Myers
On Sat, 14 Oct 2023, Martin Uecker wrote: > + if (!initialized > + && storage_class != csc_static > + && storage_class != csc_auto > + && current_scope != file_scope) I think it would be better to use TREE_PUBLIC (decl) in place of storage_class != csc_static &&

Re: RFC: attributes documentation

2023-10-03 Thread Joseph Myers
On Tue, 3 Oct 2023, Sandra Loosemore wrote: > Is __attribute__ also considered more powerful than the standard [[]] syntax, > enough to recommend it over writing standard-conforming code? Anything that can be expressed with __attribute__ should also be expressible with [[]], so use of [[]] is

Re: RFC: attributes documentation

2023-10-03 Thread Joseph Myers
On Mon, 2 Oct 2023, Sandra Loosemore wrote: > Going beyond that, though, I think we should also document that the standard > syntax is now the preferred way to do it, and change the examples (except for > the parts documenting the old syntax) to use the new standard syntax. It's > been accepted

Re: [PATCH] c, c++, v3: Accept __builtin_classify_type (typename)

2023-09-20 Thread Joseph Myers
On Wed, 20 Sep 2023, Jakub Jelinek wrote: > On Mon, Sep 18, 2023 at 09:25:19PM +0000, Joseph Myers wrote: > > > I'd like to ping this patch. > > > The C++ FE part has been approved by Jason already with a minor change > > > I've made in my copy. > > &g

Re: [PATCH 0/12] GCC _BitInt support [PR102989]

2023-09-18 Thread Joseph Myers
On Mon, 18 Sep 2023, Matthew Malcomson via Gcc-patches wrote: > On 8/9/23 19:14, Jakub Jelinek via Gcc-patches wrote: > > > It is enabled only on targets which have agreed on processor specific > > ABI how to lay those out or pass as function arguments/return values, > > which currently is just

Re: Patch ping: Re: [PATCH] c, c++, v2: Accept __builtin_classify_type (typename)

2023-09-18 Thread Joseph Myers
On Mon, 18 Sep 2023, Jakub Jelinek via Gcc-patches wrote: > Hi! > > I'd like to ping this patch. > The C++ FE part has been approved by Jason already with a minor change > I've made in my copy. > Are the remaining parts ok for trunk? In the C front-end changes, since you end up discarding any

Re: [PATCH v11 16/40] c, c++: Use 16 bits for all use of enum rid for more keyword space

2023-09-14 Thread Joseph Myers
On Wed, 13 Sep 2023, Ken Matsui via Gcc-patches wrote: > diff --git a/gcc/c/c-parser.h b/gcc/c/c-parser.h > index 545f0f4d9eb..eed6deaf0f8 100644 > --- a/gcc/c/c-parser.h > +++ b/gcc/c/c-parser.h > @@ -51,14 +51,14 @@ enum c_id_kind { > /* A single C token after string literal concatenation and

Re: [PATCH] small _BitInt tweaks

2023-09-12 Thread Joseph Myers
On Tue, 12 Sep 2023, Jakub Jelinek via Gcc-patches wrote: > And by ensuring we never create 1-bit signed BITINT_TYPE e.g. the backends > don't need to worry about them. > > But I admit I don't feel strongly about that. > > Joseph, what do you think about this? I think it's appropriate to avoid

Re: [PATCH v2 08/11] Native complex ops: Add explicit vector of complex

2023-09-12 Thread Joseph Myers
On Tue, 12 Sep 2023, Sylvain Noiry via Gcc-patches wrote: > Summary: > Allow the creation and usage of builtins vectors of complex > in C, using __attribute__ ((vector_size ())) If you're adding a new language feature like this, you need to update extend.texi to explain the valid uses of the

Re: [C PATCH 1/6 v2] c: reorganize recursive type checking

2023-09-11 Thread Joseph Myers
On Sun, 10 Sep 2023, Martin Uecker via Gcc-patches wrote: > Thanks Joseph, below is a a revised version of this patch > with slight additional changes to the comment of > tagged_types_tu_compatible_p. > > ok for trunk? The revised version of this patch is OK. -- Joseph S. Myers

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