Re: Question regarding bug 70584

2016-05-20 Thread Daniel Gutson
On Fri, May 20, 2016 at 5:42 PM, Jeff Law wrote: > On 05/20/2016 01:18 PM, Daniel Gutson wrote: >> >> (reposting in gcc@ and adding more information) >> >> On Fri, May 20, 2016 at 3:43 PM, Andres Tiraboschi >> wrote: >>> >>> While analysing this bug we arrived to the following code at >>> tree.c:

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Joseph Myers
On Fri, 20 May 2016, Andrew Haley wrote: > Given this, I do not understand why GCC does not treat implicit int as > a hard error. Because in C the existing practice has been that we support the union of all features and extensions that can sensibly be supported with the given language version (

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Joseph Myers
On Fri, 20 May 2016, Jeff Law wrote: > I think it's worth revisiting as well, burying in -pedantic seems wrong given > the kinds of failures we can see. It's not in -pedantic. The warnings are on by default for C99/C11 (and become errors with -pedantic-errors or the -Werror= options). -- Jose

Re: Question regarding bug 70584

2016-05-20 Thread Jeff Law
On 05/20/2016 01:18 PM, Daniel Gutson wrote: (reposting in gcc@ and adding more information) On Fri, May 20, 2016 at 3:43 PM, Andres Tiraboschi wrote: While analysing this bug we arrived to the following code at tree.c:145 (lvalue_kind): case VAR_DECL: if (TREE_READONLY (ref) && ! T

Re: Question regarding bug 70584

2016-05-20 Thread Daniel Gutson
(reposting in gcc@ and adding more information) On Fri, May 20, 2016 at 3:43 PM, Andres Tiraboschi wrote: > While analysing this bug we arrived to the following code at > tree.c:145 (lvalue_kind): > > case VAR_DECL: > if (TREE_READONLY (ref) && ! TREE_STATIC (ref) > && DECL_LANG_S

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Jeff Law
On 05/20/2016 03:24 AM, Florian Weimer wrote: On 05/20/2016 11:22 AM, Andreas Schwab wrote: Florian Weimer writes: C99 got rid of implicit function definitions and implicit ints. Would it be possible to remove them retroactively from the -std=gnu99 and -std=gnu11 language variants (as well as

Re: increase alignment of global structs in increase_alignment pass

2016-05-20 Thread Prathamesh Kulkarni
On 19 May 2016 at 13:19, Richard Biener wrote: > On Thu, 19 May 2016, Prathamesh Kulkarni wrote: > >> On 18 May 2016 at 19:38, Richard Biener wrote: >> > On Wed, 18 May 2016, Prathamesh Kulkarni wrote: >> > >> >> On 17 May 2016 at 18:36, Richard Biener wrote: >> >> > On Wed, 11 May 2016, Pratham

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Florian Weimer
On 05/20/2016 11:22 AM, Andreas Schwab wrote: Florian Weimer writes: C99 got rid of implicit function definitions and implicit ints. Would it be possible to remove them retroactively from the -std=gnu99 and -std=gnu11 language variants (as well as -std=c99 and -std=c11), so that they are reje

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Andreas Schwab
Florian Weimer writes: > C99 got rid of implicit function definitions and implicit ints. Would it > be possible to remove them retroactively from the -std=gnu99 and > -std=gnu11 language variants (as well as -std=c99 and -std=c11), so that > they are rejected by default? -Werror=implicit-int -W

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Andrew Haley
On 05/20/2016 10:02 AM, Florian Weimer wrote: > On 05/20/2016 10:30 AM, lh mouse wrote: >> Implicit function declarations result in warnings since C99 or GNU99 and >> '-pedantic-errors' turns them into errors. >> The same goes for implicit return types. > > The warnings typically do not stop the

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Florian Weimer
On 05/20/2016 10:30 AM, lh mouse wrote: Implicit function declarations result in warnings since C99 or GNU99 and '-pedantic-errors' turns them into errors. The same goes for implicit return types. The warnings typically do not stop the build, and thus are not really helpful when you are looki

Re: GNU C: Implicit int and implicit function definitions

2016-05-20 Thread lh mouse
Implicit function declarations result in warnings since C99 or GNU99 and '-pedantic-errors' turns them into errors. The same goes for implicit return types. -- Best regards, lh_mouse 2016-05-20 --

GNU C: Implicit int and implicit function definitions

2016-05-20 Thread Florian Weimer
I just spend an hour hunting down someone else's GCC code generation bug, when it turned out it was caused by an implicit function definition, where the real return type was incompatible with int. C99 got rid of implicit function definitions and implicit ints. Would it be possible to remove t