Re: Change in preprocessor behavior

2022-06-21 Thread Richard Biener via Gcc
On Tue, Jun 21, 2022 at 2:34 AM Dave Blanchard wrote: > > At some point between GCC 9 and GCC 12, the preprocessor started behaving > differently. Before if GCC were launched as /lib/cpp or /usr/bin/cpp (I > think) it would assume the user wanted to preprocess something and > automatically laun

Re: Build of any gcc breaks on my sparc / illumos env

2022-06-21 Thread Eric Botcazou
> As you can see, I use both illumos as and ld, but I also tried using gnu as > with the same result. I also tried using gnu ld (which is not recommended > on a sparc build, AFAIK), but that brought in different problems earlier. > Anyone can help? Using GNU as + Solaris ld is the recommended com

Safer vararg calls

2022-06-21 Thread Yair Lenga via Gcc
Hi, Looking for feedback on the adding new attribute to function calls that will help create safer vararg functions. Consider the case where a vararg function takes list of arguments of the same type. In my case, there are terminated with a sentinel of null. Char *result = delimitedstr(‘:’ “fo

Re: Safer vararg calls

2022-06-21 Thread Jonathan Wakely via Gcc
On Tue, 21 Jun 2022 at 11:17, Yair Lenga via Gcc wrote: > > Hi, > > Looking for feedback on the adding new attribute to function calls that will > help create safer vararg functions. > > Consider the case where a vararg function takes list of arguments of the same > type. In my case, there are t

GCC 10.4 Release Candidate available from gcc.gnu.org

2022-06-21 Thread Jakub Jelinek via Gcc
The first release candidate for GCC 10.4 is available from https://gcc.gnu.org/pub/gcc/snapshots/10.4.0-RC-20220621/ ftp://gcc.gnu.org/pub/gcc/snapshots/10.4.0-RC-20220621/ and shortly its mirrors. It has been generated from git commit r10-10862-g3c390f4ad27c3d79fd1817276a6d3217fd9bfb51. I

Re: Build of any gcc breaks on my sparc / illumos env

2022-06-21 Thread Joel Sherrill
Well we got gcc's verbose but in the we need ld's. Should be something like -Wl,-v If someone actually knew offhand which linker script template of used in this cases it would help. I don't and always have to dig. --joel On Mon, Jun 20, 2022, 12:09 PM Gabriele Bulfon wrote: > Thanks! This is w

GCC 10.3.1 Status Report (2022-06-21), branch frozen for release

2022-06-21 Thread Jakub Jelinek via Gcc
Status == The GCC 10 branch is frozen for the release of GCC 10.4 with a first release candidate published. All changes require release manager approval. Quality Data Priority # Change from last report --- --- P1

Re: Change in preprocessor behavior

2022-06-21 Thread Dave Blanchard
On Tue, 21 Jun 2022 09:28:00 +0200 Richard Biener wrote: > On Tue, Jun 21, 2022 at 2:34 AM Dave Blanchard wrote: > > > > At some point between GCC 9 and GCC 12, the preprocessor started behaving > > differently. Before if GCC were launched as /lib/cpp or /usr/bin/cpp (I > > think) it would a

_Unwind_Resume() references in libgcc division functions

2022-06-21 Thread Sebastian Huber
Hello, I noticed that several division related routines provided by libgcc such as __divdi3, __moddi3 and __umoddi3 have references to _Unwind_Resume for the sparc-rtems target. For example: .file "libgcc2.c" ! GNU C17 (GCC) version 13.0.0 20220621 (experimental) [master

Re: _Unwind_Resume() references in libgcc division functions

2022-06-21 Thread Jakub Jelinek via Gcc
On Tue, Jun 21, 2022 at 03:13:19PM +0200, Sebastian Huber wrote: > Hello, > > I noticed that several division related routines provided by libgcc such as > __divdi3, __moddi3 and __umoddi3 have references to _Unwind_Resume for the > sparc-rtems target. For example: That is because: ifeq ($(LIB2_

Re: _Unwind_Resume() references in libgcc division functions

2022-06-21 Thread Sebastian Huber
On 21/06/2022 15:24, Jakub Jelinek wrote: On Tue, Jun 21, 2022 at 03:13:19PM +0200, Sebastian Huber wrote: Hello, I noticed that several division related routines provided by libgcc such as __divdi3, __moddi3 and __umoddi3 have references to _Unwind_Resume for the sparc-rtems target. For exampl

[PATCH] static analysis support for posix file desccriptor APIs

2022-06-21 Thread Mir Immad via Gcc
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index b6dcc45a58a..04631f737ea 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1269,6 +1269,7 @@ ANALYZER_OBJS = \ analyzer/region-model-reachability.o \ analyzer/sm.o \ analyzer/sm-file.o \ + analyzer/sm-fd.o \ analyzer/sm-malloc.o \

Re: [PATCH] static analysis support for posix file desccriptor APIs

2022-06-21 Thread Mir Immad via Gcc
This is a patch for extending static analysis support for posix file descriptor APIs which is a part of my GSoC project. I've written a few testcases, which are all passing. There are a few TODOs like adding the copyright header and adding docs to gcc/doc/invoke.texi. I'm looking for suggestions

Re: [PATCH] static analysis support for posix file desccriptor APIs

2022-06-21 Thread David Malcolm via Gcc
Hi Immad, thanks for this patch. Overall, looks like you're making good progress. Various notes and nitpicks inline below, throughout... On Tue, 2022-06-21 at 22:00 +0530, Mir Immad wrote: [...snip...] > > diff --git a/gcc/analyzer/analyzer.opt b/gcc/analyzer/analyzer.opt > index 23dfc797cea.

Re: [PATCH] static analysis support for posix file desccriptor APIs

2022-06-21 Thread Joseph Myers
On Tue, 21 Jun 2022, David Malcolm via Gcc wrote: > So ultimately that's something we want to fix, though exactly how, I'm > not quite sure; we presumably want to look up the target's definitions > of those macros - but I don't think the analyzer has access to the > cpp_reader instance from the fr

Narrowing down preprocessor-related potential defect

2022-06-21 Thread thutt--- via Gcc
Hello folks, I am not subscribed to this mailing list, so please address responses directly to me. I have a program that generates this error: .c: In function ‘f0’: .c:117:4: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation] 117 | //#en

Re: Narrowing down preprocessor-related potential defect

2022-06-21 Thread Jonathan Wakely via Gcc
On Tue, 21 Jun 2022 at 20:31, thutt--- via Gcc wrote: >I am here to solicit ideas on how to further narrow this this >down. Is there any undocumented option that I can use to cause the >standalone preprocessor to produce output identical to input? >Note that '-traditional-cpp' doe

Re: Narrowing down preprocessor-related potential defect

2022-06-21 Thread Jonathan Wakely via Gcc
On Tue, 21 Jun 2022, 20:35 Jonathan Wakely, wrote: > On Tue, 21 Jun 2022 at 20:31, thutt--- via Gcc wrote: > >I am here to solicit ideas on how to further narrow this this > >down. Is there any undocumented option that I can use to cause the > >standalone preprocessor to produce out

Re: GCC 10.4 Release Candidate available from gcc.gnu.org

2022-06-21 Thread William Seurer via Gcc
On 6/21/22 6:33 AM, Jakub Jelinek via Gcc wrote: The first release candidate for GCC 10.4 is available from https://gcc.gnu.org/pub/gcc/snapshots/10.4.0-RC-20220621/ ftp://gcc.gnu.org/pub/gcc/snapshots/10.4.0-RC-20220621/ and shortly its mirrors. It has been generated from git commit r10

Re: Narrowing down preprocessor-related potential defect

2022-06-21 Thread thutt--- via Gcc
Jonathan Wakely writes: > âs  External Email > > On Tue, 21 Jun 2022 at 20:31, thutt--- via Gcc wrote: > >I am here to solicit ideas on how to further narrow this this > >down. Is there any undocumented option that I can use to cause the > >standalone preprocessor to produce out

Re: [PATCH] static analysis support for posix file desccriptor APIs

2022-06-21 Thread David Malcolm via Gcc
On Tue, 2022-06-21 at 18:50 +, Joseph Myers wrote: > On Tue, 21 Jun 2022, David Malcolm via Gcc wrote: > > > So ultimately that's something we want to fix, though exactly how, > > I'm > > not quite sure; we presumably want to look up the target's > > definitions > > of those macros - but I don

Re: [PATCH] static analysis support for posix file desccriptor APIs

2022-06-21 Thread Joseph Myers
On Tue, 21 Jun 2022, David Malcolm via Gcc wrote: > Joseph: is the target hook the way to go with this? Would it look > something like: > > DEFHOOK (fd_access_mode, "FIXME", int (int)) > > taking the build configuration's O_ access mode, and returning the > target configurations's access mode (

Re: [RFC] analyzer: allocation size warning

2022-06-21 Thread Tim Lange
On Sat Jun 18, 2022 at 12:13 AM CEST, David Malcolm wrote: > On Fri, 2022-06-17 at 22:23 +0200, Tim Lange wrote: > > On Fri, Jun 17, 2022 at 01:48:09PM -0400, David Malcolm wrote: > > > On Fri, 2022-06-17 at 17:54 +0200, Tim Lange wrote: > > [...snip...] > > > > > > > > I have resent the patch us

Re: [RFC] analyzer: allocation size warning

2022-06-21 Thread David Malcolm via Gcc
On Tue, 2022-06-21 at 22:00 +0200, Tim Lange wrote: > On Sat Jun 18, 2022 at 12:13 AM CEST, David Malcolm wrote: > > On Fri, 2022-06-17 at 22:23 +0200, Tim Lange wrote: > > > On Fri, Jun 17, 2022 at 01:48:09PM -0400, David Malcolm wrote: > > > > On Fri, 2022-06-17 at 17:54 +0200, Tim Lange wrote: >