Re: PR78153

2016-11-22 Thread Prathamesh Kulkarni
On 21 November 2016 at 15:10, Richard Biener wrote: > On Sun, 20 Nov 2016, Prathamesh Kulkarni wrote: > >> Hi, >> As suggested by Martin in PR78153 strlen's return value cannot exceed >> PTRDIFF_MAX. >> So I set it's range to [0, PTRDIFF_MAX - 1] in extrac

Re: PR78153

2016-11-22 Thread Prathamesh Kulkarni
On 22 November 2016 at 20:18, Richard Biener wrote: > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: > >> On 21 November 2016 at 15:10, Richard Biener wrote: >> > On Sun, 20 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> Hi, >> >> As sugge

Re: PR78153

2016-11-22 Thread Prathamesh Kulkarni
On 22 November 2016 at 20:53, Richard Biener wrote: > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: > >> On 22 November 2016 at 20:18, Richard Biener wrote: >> > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> On 21 November 2016 at 15:10,

Re: Fix PR78154

2016-11-23 Thread Prathamesh Kulkarni
On 22 November 2016 at 20:23, Richard Biener wrote: > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: > >> On 21 November 2016 at 15:34, Richard Biener wrote: >> > On Fri, 18 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> On 17 November 2016 at 15:24,

Re: PR78153

2016-11-23 Thread Prathamesh Kulkarni
On 23 November 2016 at 15:16, Richard Biener wrote: > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: > >> On 22 November 2016 at 20:53, Richard Biener wrote: >> > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> On 22 November 2016 at 20:18,

Re: PR78153

2016-11-23 Thread Prathamesh Kulkarni
On 23 November 2016 at 17:21, Richard Biener wrote: > On Wed, 23 Nov 2016, Prathamesh Kulkarni wrote: > >> On 23 November 2016 at 15:16, Richard Biener wrote: >> > On Tue, 22 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> On 22 November 2016 at 20:53,

Re: PR78153

2016-11-23 Thread Prathamesh Kulkarni
On 23 November 2016 at 17:51, Richard Biener wrote: > On Wed, 23 Nov 2016, Prathamesh Kulkarni wrote: > >> On 23 November 2016 at 17:21, Richard Biener wrote: >> > On Wed, 23 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> On 23 November 2016 at 15:16,

[tree-tailcall] Check if function returns it's argument

2016-11-23 Thread Prathamesh Kulkarni
hanks, Prathamesh 2016-11-24 Prathamesh Kulkarni * gimple.c (gimple_call_return_arg): New function. * gimple.h (gimple_call_return_arg): Declare. * tree-tailcall.c (find_tail_calls): Call gimple_call_return_arg. testsuite/ * gcc.dg/tree-ssa/tailcall-8.c: New test.

Re: [PR78365] ICE in determine_value_range, at tree-ssa-loo p-niter.c:413

2016-11-24 Thread Prathamesh Kulkarni
On 24 November 2016 at 15:23, Jan Hubicka wrote: >> >If DECL_ARGUMENTS is not available at WPA stage then I see no other >> >way than to put the types on the jump functions. >> > >> OK. I will record the type in jump function and send a revised patch. > > It would be good to check how much of diff

Re: [tree-tailcall] Check if function returns it's argument

2016-11-24 Thread Prathamesh Kulkarni
On 24 November 2016 at 14:07, Richard Biener wrote: > On Thu, 24 Nov 2016, Prathamesh Kulkarni wrote: > >> Hi, >> Consider following test-case: >> >> void *f(void *a1, void *a2, __SIZE_TYPE__ a3) >> { >> __builtin_memcpy (a1, a2, a3); >> r

Re: [tree-tailcall] Check if function returns it's argument

2016-11-24 Thread Prathamesh Kulkarni
On 24 November 2016 at 17:48, Richard Biener wrote: > On Thu, 24 Nov 2016, Prathamesh Kulkarni wrote: > >> On 24 November 2016 at 14:07, Richard Biener wrote: >> > On Thu, 24 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> Hi, >> >> Cons

reject decl with incomplete struct/union type in check_global_declaration()

2016-01-14 Thread Prathamesh Kulkarni
Hi, For test-case containing only the following declaration: static struct undefined_struct object; gcc rejects it at -O0 in assemble_variable() with error "storage size of is unknown", however no error is reported when compiled with -O2. AFAIU that happens because at -O2, analyze_function() remov

Re: reject decl with incomplete struct/union type in check_global_declaration()

2016-01-15 Thread Prathamesh Kulkarni
On 15 January 2016 at 03:27, Joseph Myers wrote: > On Thu, 14 Jan 2016, Prathamesh Kulkarni wrote: > >> Hi, >> For test-case containing only the following declaration: >> static struct undefined_struct object; >> gcc rejects it at -O0 in assemble_variable() with

Re: reject decl with incomplete struct/union type in check_global_declaration()

2016-01-16 Thread Prathamesh Kulkarni
On 16 January 2016 at 02:56, Joseph Myers wrote: > On Fri, 15 Jan 2016, Prathamesh Kulkarni wrote: > >> On 15 January 2016 at 03:27, Joseph Myers wrote: >> > On Thu, 14 Jan 2016, Prathamesh Kulkarni wrote: >> > >> >> Hi, >> >> For test-case c

Re: [ARM] implement division using vrecpe/vrecps with -funsafe-math-optimizations

2016-01-17 Thread Prathamesh Kulkarni
On 31 July 2015 at 15:04, Ramana Radhakrishnan wrote: > > > On 29/07/15 11:09, Prathamesh Kulkarni wrote: >> Hi, >> This patch tries to implement division with multiplication by >> reciprocal using vrecpe/vrecps >> with -funsafe-math-optimizations and -freciproc

[match-and-simplify] print capture name

2014-12-14 Thread Prathamesh Kulkarni
Print name of capture in patterns written by user. * genmatch.c (capture::name): New. (capture::capture): New default argument. (parse_capture): Pass id to capture::capture. (print_operand): Print name of capture if available. Thanks, Prathamesh

Re: [match-and-simplify] print capture name

2014-12-14 Thread Prathamesh Kulkarni
On 15 December 2014 at 02:03, Prathamesh Kulkarni wrote: > Print name of capture in patterns written by user. > > * genmatch.c > (capture::name): New. > (capture::capture): New default argument. > (parse_capture): Pass id to capture::capture. > (print_operand): Pri

[match-and-simplify] set simplify::capture_max to 0 if pattern contains no captures

2014-12-14 Thread Prathamesh Kulkarni
Caused segfault for pattern containing no captures at: info.safe_grow_cleared(capture_max + 1); in capture_info::capture_info artificial test-case: (define_predicates integer_zerop) (simplify (bit_not integer_zerop) { build_zero_cst (type); }) * genmatch.c (simplify::simplify): Set simplify

flattening cfgloop.h

2014-12-14 Thread Prathamesh Kulkarni
languages c, c++ enabled. Thank you, Prathamesh 2014-12-14 Prathamesh Kulkarni * cfgloopanal.h: New header file containing function prototypes from cfgloopanal.c * cfgloop.h: Remove includes. (mark_irreducible_loops): Move prototype to cfgloopanal.h (num_loop_insns

[match-and-simplify] allow 't' only in user-defined predicates

2014-12-16 Thread Prathamesh Kulkarni
This patch rejects 't' outside user-defined predicates. 2014-12-16 Prathamesh Kulkarni * genmatch.c (parser::parsing_match): New. (parser::parser): Initialize parsing_match to false. (parser::parse_pattern): Reset parsing_match when parsing us

Re: [match-and-simplify] allow 't' only in user-defined predicates

2014-12-16 Thread Prathamesh Kulkarni
sorry for the noise. I sent it just before our conversation on IRC. On 16 December 2014 at 19:58, Prathamesh Kulkarni wrote: > This patch rejects 't' outside user-defined predicates. > > 2014-12-16 Prathamesh Kulkarni > > * genmatch.c (parser::parsing_match

Re: flattening cfgloop.h

2014-12-17 Thread Prathamesh Kulkarni
On 17 December 2014 at 21:15, Richard Biener wrote: > On Sun, Dec 14, 2014 at 10:39 PM, Prathamesh Kulkarni > wrote: >> Hi, >> The attached patch flattens cfgloop.h. >> Created new file cfgloopanal.h which exports function prototypes >> from cfgloopanal

[MAINTAINERS] add myself under write after approval

2014-12-17 Thread Prathamesh Kulkarni
Kratochvil +Prathamesh Kulkarni Venkataramanan Kumar Maxim Kuvyrkov Doug Kwan

Re: flatten expr.h

2014-12-18 Thread Prathamesh Kulkarni
Hi, I had a discussion with Michael, and would like to put this patch on hold for now till we have tree.h and rtl.h flattening patches checked in to avoid conflicts. Thankyou, Prathamesh On 16 December 2014 at 17:13, Prathamesh Kulkarni wrote: > Hi, > The attached patch flattens

Re: Flatten tree.h and tree-core.h

2014-12-19 Thread Prathamesh Kulkarni
On 20 December 2014 at 02:16, Michael Collison wrote: > The reason I included tree-core.h in all the .c files was the requirement in > tree.h (now flattened to the .c files) for fold-const.h. In tree.h there are > inline functions such as fold_build_pointer_plus_hwi_loc which reference > functions

[match-and-simplify] add default arguments to parser::parse_simplify.

2014-12-21 Thread Prathamesh Kulkarni
Committed (r218996) as obvious. Thanks, Prathamesh 2014-12-21 Prathamesh Kulkarni * genmatch.c (parser::parse_simplify): Make last two parametes have default value 0. (parser::parse_pattern): Adjust call to parser::parse_simplify to avoid passing default arguments. Index: gcc

[match-and-simplify] Remove printing "for expression"

2014-12-21 Thread Prathamesh Kulkarni
unsigned i = 0; i < p.simplifiers.length (); ++i) 2014-12-12 Prathamesh Kulkarni * genmatch.c (print_matches): Change type of first parameter to operand *. Remove call to fprintf to print "for expression: ". (main): Adjust call to print_matches.

Re: [match-and-simplify] Remove printing "for expression"

2014-12-21 Thread Prathamesh Kulkarni
On 22 December 2014 at 03:21, Prathamesh Kulkarni wrote: > Hi, > I removed printing "for expression:" from print_matches. I think it > is out of place tvim here and we call print_matches after lowering. > OK to commit ? s/"tvim here"/there. > > Thanks, > Prathamesh

Re: [PATCH] Flatten tree.h and tree-core.h (Version 3)

2015-01-09 Thread Prathamesh Kulkarni
On 9 January 2015 at 16:21, Richard Biener wrote: > On Fri, Jan 9, 2015 at 10:39 AM, Michael Collison > wrote: >> This patch flattens tree.h and tree-core.h. This is a revised patch that >> does not include tree-core.h as a result of flattening. >> >> Version 3 of the patch adds the header files

Re: [PATCH] Flatten tree.h and tree-core.h (Version 3)

2015-01-09 Thread Prathamesh Kulkarni
On 10 January 2015 at 02:58, Jakub Jelinek wrote: > On Sat, Jan 10, 2015 at 01:50:42AM +0530, Prathamesh Kulkarni wrote: >> >> I bootstrapped on x86 with all languages. I also bootstrapped on all >> >> targets >> >> listed in contrib/config-list.mk with

[PATCH] fix visium build

2015-01-09 Thread Prathamesh Kulkarni
Hi, The tree.h and tree-core.h flattening patch: (https://gcc.gnu.org/ml/gcc-patches/2015-01/msg00467.html broke visium build. The attached patch fixes that. Built on visium-elf. OK to commit ? Thank you, Prathamesh 2015-01-09 Prathamesh Kulkarni * config/visium/visium.c: Add includes

Re: [match-and-simplify] Remove printing "for expression"

2015-01-10 Thread Prathamesh Kulkarni
On 8 January 2015 at 17:52, Richard Biener wrote: > On Sun, 21 Dec 2014, Prathamesh Kulkarni wrote: > >> Hi, >> I removed printing "for expression:" from print_matches. I think it >> is out of place tvim here and we call print_matches after lowering. >>

[PATCH, testsuite] fix ggcplug.c test-case

2015-01-10 Thread Prathamesh Kulkarni
. */ /* { dg-options "-O" } */ +#include "gcc-plugin.h" #include "config.h" #include "system.h" #include "coretypes.h" #include "tm.h" #include "tree.h" -#include "gcc-plugin.h" #include "toplev.h" #inc

Re: [PATCH, committed] Fix build of jit (was Re: [PATCH] Flatten tree.h and tree-core.h (Version 3))

2015-01-11 Thread Prathamesh Kulkarni
On 10 January 2015 at 03:17, David Malcolm wrote: > On Sat, 2015-01-10 at 01:50 +0530, Prathamesh Kulkarni wrote: >> On 9 January 2015 at 16:21, Richard Biener >> wrote: >> > On Fri, Jan 9, 2015 at 10:39 AM, Michael Collison >> > wrote: >> >> This p

Re: [BUILDROBOT] tilepro-linux/tilegx-linux fallout from flattening

2015-01-11 Thread Prathamesh Kulkarni
e dependency on tree-core.h ? > > On 01/11/2015 08:36 PM, Jan-Benedict Glaw wrote: >> >> On Sat, 2015-01-10 01:50:42 +0530, Prathamesh Kulkarni >> wrote: >>> >>> On 9 January 2015 at 16:21, Richard Biener >>> wrote: >>>> >>>>

Re: [PATCH, testsuite] fix ggcplug.c test-case

2015-01-12 Thread Prathamesh Kulkarni
On 12 January 2015 at 14:19, Richard Biener wrote: > On Sun, 11 Jan 2015, Prathamesh Kulkarni wrote: > >> Hi, >> The test-case plugin/ggcplug.c was failing due to flattening of tree.h >> and tree-core.h. >> Test-case was incorrect because it included gcc-plugin

Re: [PATCH, testsuite] fix ggcplug.c test-case

2015-01-12 Thread Prathamesh Kulkarni
On 12 January 2015 at 14:36, Richard Biener wrote: > On Mon, 12 Jan 2015, Prathamesh Kulkarni wrote: > >> On 12 January 2015 at 14:19, Richard Biener wrote: >> > On Sun, 11 Jan 2015, Prathamesh Kulkarni wrote: >> > >> >> Hi, >> >> The test-

Re: [PATCH, testsuite] fix ggcplug.c test-case

2015-01-12 Thread Prathamesh Kulkarni
On 12 January 2015 at 15:49, Richard Biener wrote: > On Mon, 12 Jan 2015, Prathamesh Kulkarni wrote: > >> On 12 January 2015 at 14:36, Richard Biener wrote: >> > On Mon, 12 Jan 2015, Prathamesh Kulkarni wrote: >> > >> >> On 12 January 2015 at 14:19, Ric

Re: [PATCH] Flatten tree.h and tree-core.h (Version 3)

2015-01-12 Thread Prathamesh Kulkarni
On 12 January 2015 at 16:24, Andreas Schwab wrote: > I'm getting this testsuite regression: > > FAIL: gcc.dg/plugin/ggcplug.c compilation Fixed with r219458. Thanks, Prathamesh > > In file included from > /usr/local/gcc/gcc-20150112/gcc/testsuite/../../gcc/tree.h:23:0, > from >

Re: [PATCH, committed] Fix build of jit (was Re: [PATCH] Flatten tree.h and tree-core.h (Version 3))

2015-01-12 Thread Prathamesh Kulkarni
On 13 January 2015 at 00:01, Mike Stump wrote: > On Jan 11, 2015, at 2:33 PM, Prathamesh Kulkarni > wrote: >> oops, sorry about this. We will build further flattening patches with >> --enable-languages=all,go,jit,ada. >> Shall that cover all the front-ends ? > > No

Re: flatten expr.h (version 2)

2015-01-13 Thread Prathamesh Kulkarni
On 13 January 2015 at 15:34, Richard Biener wrote: > On Sun, 11 Jan 2015, Prathamesh Kulkarni wrote: > >> Hi, >> This is a revamped expr.h flattening flattening patch rebased on >> tree.h and tree-core.h flattening patch (r219402). >> It depends upon the following pa

Re: flatten expr.h (version 2)

2015-01-13 Thread Prathamesh Kulkarni
On 13 January 2015 at 16:06, Prathamesh Kulkarni wrote: > On 13 January 2015 at 15:34, Richard Biener wrote: >> On Sun, 11 Jan 2015, Prathamesh Kulkarni wrote: >> >>> Hi, >>> This is a revamped expr.h flattening flattening patch rebased on >>> tree.h

Re: flatten expr.h (version 2)

2015-01-13 Thread Prathamesh Kulkarni
On 13 January 2015 at 22:02, Prathamesh Kulkarni wrote: > On 13 January 2015 at 16:06, Prathamesh Kulkarni > wrote: >> On 13 January 2015 at 15:34, Richard Biener wrote: >>> On Sun, 11 Jan 2015, Prathamesh Kulkarni wrote: >>> >>>> Hi, >>>>

Re: flatten expr.h (version 2)

2015-01-14 Thread Prathamesh Kulkarni
On 14 January 2015 at 16:40, Prathamesh Kulkarni wrote: > On 14 January 2015 at 14:34, Richard Biener wrote: >> On Wed, 14 Jan 2015, Prathamesh Kulkarni wrote: >> >>> On 13 January 2015 at 22:02, Prathamesh Kulkarni >>> wrote: >>> > On 13 January 20

Re: flatten expr.h (version 2)

2015-01-14 Thread Prathamesh Kulkarni
On 14 January 2015 at 17:31, Richard Biener wrote: > On Wed, 14 Jan 2015, Prathamesh Kulkarni wrote: > >> On 14 January 2015 at 11:16, Prathamesh Kulkarni >> wrote: >> > On 14 January 2015 at 16:40, Prathamesh Kulkarni >> > wrote: >> >> On

[match-and-simplify] remove dt_node::level_max

2014-09-15 Thread Prathamesh Kulkarni
* genmatch.c (dt_node::level_max): Remove. Thanks, Prathamesh Index: genmatch.c === --- genmatch.c (revision 215271) +++ genmatch.c (working copy) @@ -466,7 +466,6 @@ struct dt_simplify: public dt_node { - static const unsigned l

[match-and-simplify] CSE with expression captures

2014-09-15 Thread Prathamesh Kulkarni
This patch attempts to performs CSE on expression captures. I have reused captures[] to store the result of expression (capture::what). * genmatch.c (operand::gen_transform): Add dt_operand ** default argument to operand heirarchy. (expr::gen_transform): Adjust. (capture::gen_transform): Likew

Re: [match-and-simplify] CSE with expression captures

2014-09-15 Thread Prathamesh Kulkarni
On Tue, Sep 16, 2014 at 2:15 AM, Marc Glisse wrote: > On Tue, 16 Sep 2014, Prathamesh Kulkarni wrote: > >> --- gcc/match-builtin.pd(revision 215271) >> +++ gcc/match-builtin.pd(working copy) >> @@ -44,8 +44,8 @@ >> /* ??? There is no

[libcpp] use CPP_PEDANTIC

2014-04-24 Thread Prathamesh Kulkarni
Use macro CPP_PEDANTIC (PF) instead of directly using it's definition: CPP_OPTION (PF, cpp_pedantic). [libcpp] * directives.c (_cpp_handle_directive): Use CPP_PEDANTIC macro. * macro.c (parse_params): Likewise. Bootstrapped on x86_64-unknown-linux-gnu. OK for trunk ? Thanks and Regards, Prathame

Re: [GSoC] use obstack in parse_c_expr

2014-04-25 Thread Prathamesh Kulkarni
gt; > On Thu, Apr 24, 2014 at 8:15 AM, Prathamesh Kulkarni > wrote: >> >> Hi, >>There was a comment in parse_c_expr, mentioning to use obstack to >> build c-code string. I have attached patch for the same. >> OK to commit ? >> >> * genmatch.c (parse

Re: [libcpp] use CPP_PEDANTIC

2014-04-25 Thread Prathamesh Kulkarni
On Fri, Apr 25, 2014 at 11:19 PM, Tom Tromey wrote: >>>>>> "Prathamesh" == Prathamesh Kulkarni writes: > > Prathamesh> Use macro CPP_PEDANTIC (PF) instead of directly using > Prathamesh> it's definition: CPP_OPTION (PF, cpp_pedantic). > &g

[C PATCH] proposal to add new warning -Wsizeof-array-argument

2014-04-26 Thread Prathamesh Kulkarni
Hi, Shall it a good idea to add new warning -Wsizeof-array-argument that warns when sizeof is applied on parameter declared as an array ? Similar to clang's -Wsizeof-array-argument: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20110613/042812.html This was also reported as PR6940:

Re: [C PATCH] proposal to add new warning -Wsizeof-array-argument

2014-04-27 Thread Prathamesh Kulkarni
On Sun, Apr 27, 2014 at 5:31 PM, Trevor Saunders wrote: > On Sun, Apr 27, 2014 at 02:31:46AM +0530, Prathamesh Kulkarni wrote: >> Hi, >> Shall it a good idea to add new warning -Wsizeof-array-argument that >> warns when sizeof is applied on parameter declared as

Re: [C PATCH] proposal to add new warning -Wsizeof-array-argument

2014-04-27 Thread Prathamesh Kulkarni
On Sun, Apr 27, 2014 at 8:48 PM, Trevor Saunders wrote: > On Sun, Apr 27, 2014 at 06:21:20PM +0530, Prathamesh Kulkarni wrote: >> On Sun, Apr 27, 2014 at 5:31 PM, Trevor Saunders >> wrote: >> > On Sun, Apr 27, 2014 at 02:31:46AM +0530, Prathamesh Kulkarni wrote: >&g

Re: [C PATCH] proposal to add new warning -Wsizeof-array-argument

2014-04-27 Thread Prathamesh Kulkarni
On Sun, Apr 27, 2014 at 11:22 PM, wrote: > > >> On Apr 27, 2014, at 10:09 AM, Prathamesh Kulkarni >> wrote: >> >>> On Sun, Apr 27, 2014 at 8:48 PM, Trevor Saunders >>> wrote: >>>> On Sun, Apr 27, 2014 at 06:21:20PM +0530, Prathamesh

Re: [C PATCH] proposal to add new warning -Wsizeof-array-argument

2014-04-27 Thread Prathamesh Kulkarni
On Mon, Apr 28, 2014 at 1:31 AM, Andrew Pinski wrote: > On Sun, Apr 27, 2014 at 12:50 PM, Prathamesh Kulkarni > wrote: >> On Sun, Apr 27, 2014 at 11:22 PM, wrote: >>> >>> >>>> On Apr 27, 2014, at 10:09 AM, Prathamesh Kulkarni >>>> wro

Re: [C PATCH] proposal to add new warning -Wsizeof-array-argument

2014-04-27 Thread Prathamesh Kulkarni
On Mon, Apr 28, 2014 at 2:13 AM, Andrew Pinski wrote: > On Sun, Apr 27, 2014 at 1:25 PM, Prathamesh Kulkarni > wrote: >> On Mon, Apr 28, 2014 at 1:31 AM, Andrew Pinski wrote: >>> On Sun, Apr 27, 2014 at 12:50 PM, Prathamesh Kulkarni >>> wrote: >>>>

Re: -Wvariadic-macros does not print warning

2014-04-29 Thread Prathamesh Kulkarni
On Tue, Apr 29, 2014 at 2:07 PM, Manuel López-Ibáñez wrote: > On 23 April 2014 20:03, Prathamesh Kulkarni > wrote: >> I didn't attach the patch, I am extremely sorry for the noise. >> I am re-posting the mail. >> This is a follow up mail to >> http://gcc.g

Re: -Wvariadic-macros does not print warning

2014-04-29 Thread Prathamesh Kulkarni
f the GNU > +alternate syntax is used in ISO C99 mode. This is enabled by either > +@option{-Wpedantic} or @option{-Wtraditional}. To inhibit the warning > +messages, use @option{-Wno-variadic-macros}. > > @item -Wvarargs > @opindex Wvarargs Thanks. I added this to the patch. &g

Re: -Wvariadic-macros does not print warning

2014-04-29 Thread Prathamesh Kulkarni
On Tue, Apr 29, 2014 at 7:37 PM, Prathamesh Kulkarni wrote: > On Tue, Apr 29, 2014 at 6:49 PM, Manuel López-Ibáñez > wrote: >> This hunk in your patch doesn't seem related: > Oops, Sorry. Removed that, and re-tested. >> >> @@ -509,6 +509,9 @@ Warn about missing f

[libcpp] modify undef diagnostic

2014-04-29 Thread Prathamesh Kulkarni
Append "evaluates to 0", in Wundef diagnostic. clang prints the following diagnostic for -Wundef: undef.c:1:5: warning: 'FOO' is not defined, evaluates to 0 [-Wundef] #if FOO ^ OK to commit ? [libcpp] * expr.c (eval_token): Modify Wundef diagnostic. [gcc/testsuite/gcc.dg/cpp] * warn-undef.c:

Re: [C PATCH] proposal to add new warning -Wsizeof-array-argument

2014-05-03 Thread Prathamesh Kulkarni
On Fri, May 2, 2014 at 5:50 AM, Joseph S. Myers wrote: > The following apply to all versions of this patch: > > * New options need documenting in invoke.texi. Added. > > * New options need nonempty help text in c.opt. (It's unfortunate that > the -Wsizeof-pointer-memaccess option immediately abov

proposal to add -Wheader-guard option

2014-02-04 Thread Prathamesh Kulkarni
Hi, I was wondering if it's a good idea to add -Wheader-guard option that warns on mismatches between #ifndef and #define lines in header guard, similar to -Wheader-guard in clang-3.4 ? (http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html) I have implemented patch for -Wheader-guard (p

remove C_EXPR_APPEND macro

2014-02-07 Thread Prathamesh Kulkarni
This patch removes C_EXPR_APPEND macro in c-tree.h OK for trunk ? * c-parser.c (c_parser_get_builtin_args): replace calls to C_EXPR_APPEND (cexpr_list, expr) by vec_safe_push (cexpr_list, expr) * c-tree.h (C_EXPR_APPEND): removed Index: gcc/c/c-parser.c ==

Re: remove C_EXPR_APPEND macro

2014-02-07 Thread Prathamesh Kulkarni
On Sat, Feb 8, 2014 at 2:22 AM, Joseph S. Myers wrote: > On Sat, 8 Feb 2014, Prathamesh Kulkarni wrote: > >> This patch removes C_EXPR_APPEND macro in c-tree.h >> OK for trunk ? > > Thanks, this is OK with the orphan comment "A varray of c_expr_t." also > remo

Re: remove C_EXPR_APPEND macro

2014-02-07 Thread Prathamesh Kulkarni
On Sat, Feb 8, 2014 at 3:06 AM, Marek Polacek wrote: > On Sat, Feb 08, 2014 at 02:51:03AM +0530, Prathamesh Kulkarni wrote: >> On Sat, Feb 8, 2014 at 2:22 AM, Joseph S. Myers >> wrote: >> > On Sat, 8 Feb 2014, Prathamesh Kulkarni wrote: >> > >> >>

print quotes around )

2014-02-09 Thread Prathamesh Kulkarni
A trivial fix to print quotes around ) in libcpp/macro.c OK for trunk ? * macro.c (parse_params): print quote around ) in call to cpp_error() in case CPP_EOF Index: libcpp/macro.c === --- libcpp/macro.c(revision 207627) +++ libcp

Re: print quotes around )

2014-02-09 Thread Prathamesh Kulkarni
On Sun, Feb 9, 2014 at 8:31 PM, Prathamesh Kulkarni wrote: > A trivial fix to print quotes around ) in libcpp/macro.c > OK for trunk ? Will not work for if pfile->cb.error callback does not recognize %< and %> (maybe clients other than c, c++ front-ends ?). So we cannot include %

fix typo in doc/generic.texi

2014-02-11 Thread Prathamesh Kulkarni
* (generic.texi): Fix typo Index: generic.texi === --- generic.texi(revision 207627) +++ generic.texi(working copy) @@ -53,7 +53,7 @@ seems inelegant. @node Deficiencies @section Deficiencies -There are many places in which

fold strchr (e, 0) to e + strlen (e)

2014-02-15 Thread Prathamesh Kulkarni
This patch folds strchr (e, 0) to e + strlen (e), if e has no side-effects. Bootstrapped, regtested on x86_64-unknown-linux-gnu Ok for trunk ? [gcc] * gcc/builtins.c (fold_builtin_strchr): returns tree for s1 + strlen (s1) if TREE_SIDE_EFFECTS (s1) is false and integer_zerop (s2) is true. [gcc/t

Re: fold strchr (e, 0) to e + strlen (e)

2014-02-15 Thread Prathamesh Kulkarni
On Sat, Feb 15, 2014 at 2:28 PM, Jakub Jelinek wrote: > On Sat, Feb 15, 2014 at 02:23:24PM +0530, Prathamesh Kulkarni wrote: >> This patch folds strchr (e, 0) to e + strlen (e), if e has no side-effects. >> Bootstrapped, regtested on x86_64-unknown-linux-gnu >> Ok for trunk ?

c-parser.c replace error() by error_at()

2014-02-19 Thread Prathamesh Kulkarni
Replace calls to error() by error_at(). * c-parser.c (c_parser_declspecs): replace call to error () by error_at () * c-parser.c (c_parser_parameter_declaration): Likewise Bootstrapped on x86_64-unknown-linux-gnu Ok for trunk ? Thanks and Regards, Prathamesh Index: gcc/c/c-parser.c =

Re: c-parser.c replace error() by error_at()

2014-02-19 Thread Prathamesh Kulkarni
On Wed, Feb 19, 2014 at 7:01 PM, Marek Polacek wrote: > On Wed, Feb 19, 2014 at 06:05:12PM +0530, Prathamesh Kulkarni wrote: >> Replace calls to error() by error_at(). >> >> * c-parser.c (c_parser_declspecs): replace call to error () by error_at () > > "Replace&q

Re: c-parser.c replace error() by error_at()

2014-02-19 Thread Prathamesh Kulkarni
On Wed, Feb 19, 2014 at 7:56 PM, Marek Polacek wrote: > On Wed, Feb 19, 2014 at 07:43:56PM +0530, Prathamesh Kulkarni wrote: >> Index: gcc/testsuite/gcc.dg/decl-9.c >> === >> --- gcc/testsuite/gcc.dg/decl

Re: c-parser.c replace error() by error_at()

2014-02-19 Thread Prathamesh Kulkarni
On Wed, Feb 19, 2014 at 9:41 PM, Marek Polacek wrote: > On Wed, Feb 19, 2014 at 08:45:04PM +0530, Prathamesh Kulkarni wrote: >> Index: gcc/c/c-parser.c >> === >> --- gcc/c/c-parser.c (revision 207700) >> ++

Re: c-parser.c replace error() by error_at()

2014-02-20 Thread Prathamesh Kulkarni
On Wed, Feb 19, 2014 at 11:32 PM, Joseph S. Myers wrote: > On Wed, 19 Feb 2014, Prathamesh Kulkarni wrote: > >> I have sent it attached this time. > > Thanks, this version is OK. Please start the copyright assignment > paperwork process if you haven't alre

[C PATCH] fix column number in comma expression warning

2014-02-20 Thread Prathamesh Kulkarni
Show column number of left operand instead of comma operator in the warning "left-hand operand of comma expression has no effect" Example: ax.c:4:6: warning: left-hand operand of comma expression has no effect [-Wunused-value] x , y; ^ Instead of comma operator, show location of left-op

Re: [C PATCH] fix column number in comma expression warning

2014-02-20 Thread Prathamesh Kulkarni
On Thu, Feb 20, 2014 at 6:26 PM, Marek Polacek wrote: > On Thu, Feb 20, 2014 at 05:52:09PM +0530, Prathamesh Kulkarni wrote: >> Show column number of left operand instead of comma operator >> in the warning "left-hand operand of comma expression has no effect" >> &

[C PATCH] remove goto in c_parser_sizeof_expression

2014-02-22 Thread Prathamesh Kulkarni
Not sure if this a good idea, but it seemed to me that goto sizeof_expr; wasn't really required in c_parser_sizeof_expression. Bootstrapped and regression tested on x8_64-unknown-linux-gnu Ok for trunk ? * c-parser.c (c_parser_sizeof_expression): Remove goto sizeof_expr; Thanks and Regards, Prath

Re: [C PATCH] remove goto in c_parser_sizeof_expression

2014-02-22 Thread Prathamesh Kulkarni
On Sat, Feb 22, 2014 at 10:34 PM, Prathamesh Kulkarni wrote: > Not sure if this a good idea, but it seemed to me that goto sizeof_expr; > wasn't > really required in c_parser_sizeof_expression. > Bootstrapped and regression tested on x8_64-unknown-linux-gnu > Ok for trun

Re: [C PATCH] remove goto in c_parser_sizeof_expression

2014-02-22 Thread Prathamesh Kulkarni
On Sat, Feb 22, 2014 at 11:44 PM, Marek Polacek wrote: > On Sat, Feb 22, 2014 at 10:34:13PM +0530, Prathamesh Kulkarni wrote: >> Not sure if this a good idea, but it seemed to me that goto sizeof_expr; >> wasn't >> really required in c_parser_sizeof_expression. >

Re: [C PATCH] remove goto in c_parser_sizeof_expression

2014-02-24 Thread Prathamesh Kulkarni
On Sun, Feb 23, 2014 at 1:18 AM, Marek Polacek wrote: > On Sun, Feb 23, 2014 at 12:19:49AM +0530, Prathamesh Kulkarni wrote: >> Is this fine ? > > No, there still are some formatting issues. > >>

Re: [C PATCH] remove goto in c_parser_sizeof_expression

2014-02-24 Thread Prathamesh Kulkarni
On Mon, Feb 24, 2014 at 11:28 PM, Marek Polacek wrote: > On Mon, Feb 24, 2014 at 11:08:27PM +0530, Prathamesh Kulkarni wrote: >> I apologize for bothering with stupid mistakes. > > No problem, it takes some time to get up to speed. > >> + mark_exp_read (expr.val

hard-reg-set.h replace #else #if by #elif

2014-02-25 Thread Prathamesh Kulkarni
Not sure if this is a good idea, I thought it would be better to replace #else #if by #elif. * hard-reg-set.h: Replace #else #if by #elif. Bootstrapped on x86_64-unknown-linux-gnu. Ok for trunk ? Thanks and Regards, Prathamesh Index: gcc/hard-reg-set.h

[GSoC][match-and-simplify] Add DEBUG_FUNCTION attribute

2014-07-13 Thread Prathamesh Kulkarni
This patch adds DEBUG_FUNCTION attribute to print_* functions in genmatch.c * genmatch.c (print_operand): Add attribute DEBUG_FUNCTION. (print_matches): Likewise. (decision_tree::print_node): Likewise. (decision_tree::print): Likewise. Thanks and Regards, Prathamesh Index: genmatch.c ==

[GSoC][match-and-simplify] use integral_op_p

2014-07-13 Thread Prathamesh Kulkarni
Hi, This patch uses integral_op_p instead of if (INTEGRAL_TYPE_P (TREE_TYPE (@0))) * match.pd: Remove INTEGRAL_TYPE_P (TREE_TYPE (@0)) in bitwise patterns and use integral_op_p@0 Thanks and Regards, Prathamesh Index: match.pd ===

Re: [GSoC] symbol to denote multiple operators

2014-07-14 Thread Prathamesh Kulkarni
On Mon, Jul 14, 2014 at 5:36 PM, Richard Biener wrote: > On Fri, Jul 11, 2014 at 4:59 PM, Prathamesh Kulkarni > wrote: >> On 7/11/14, Richard Biener wrote: >>> On Thu, Jul 10, 2014 at 8:05 PM, Prathamesh Kulkarni >>> wrote: >>>> Hi, >>>>

[gsoc][match-and-simplify] allow multiple patterns inside for ?

2014-07-22 Thread Prathamesh Kulkarni
Would it be a good idea to allow multiple match_and_simplify within for ? * genmatch.c (parse_for): Adjust to parse multiple patterns. Thanks and Regards, Prathamesh Index: genmatch.c === --- genmatch.c (revision 212558) +++ genmatch

Re: [gsoc][match-and-simplify] allow multiple patterns inside for ?

2014-07-22 Thread Prathamesh Kulkarni
On Wed, Jul 23, 2014 at 3:42 AM, Prathamesh Kulkarni wrote: > Would it be a good idea to allow multiple match_and_simplify within for ? allow multiple patterns (match_and_simplify, for). > * genmatch.c (parse_for): Adjust to parse multiple patterns. > > Thanks and Regards, > Prathamesh

[GSoC][match-and-simplify] remove unnecessary debug information

2014-07-22 Thread Prathamesh Kulkarni
I was displaying pattern = for debugging some issue related to implementing for-pattern, not meant for dumping with -v Removed accordingly. * genmatch.c (main): Remove unnecessary debug information. Thanks and Regards, Prathamesh Index: genmatch.c

[GSoC][match-and-simplify] change syntax of inner-if

2014-07-22 Thread Prathamesh Kulkarni
This patch changes syntax of inner-if to be parenthesized - (if (cond)) * genmatch.c (parse_match_and_simplify): Adjust to parse parenthesized if. (peek_ident): New function. * match.pd: Adjust patterns having if-expr to new syntax. Thanks and Regards, Prathamesh Index: gcc/genmatch.c =

[GSoC][match-and-simplify] reject for that has no pattern defined

2014-07-26 Thread Prathamesh Kulkarni
Reject for that has no pattern defined. eg - (for op in plus minus) * genmatch.c (parse_for): Reject for that has no pattern defined. Thanks and Regards, Prathamesh Index: genmatch.c === --- genmatch.c (revision 212928) +++ genmatch.

[GSoC][match-and-simplify] sanitize option checking

2014-07-27 Thread Prathamesh Kulkarni
Added checks to see if either cmmand-line options is not repeated, and generates match-and-simplify code on both GENERIC and GIMPLE if both -generic and -gimple are specified. * genmatch.c (cmd_options): New struct. (check_repeated_arg): New function. (parse_cmd_arg): Likewise. (main):

[GSoC][match-and-simplify] include is-a.h

2014-07-27 Thread Prathamesh Kulkarni
Is it okay to include is-a.h ? I have adjusted print_operand to use is_a<> and as_a<> in this patch. * genmatch.c (is-a.h): Include. (is_a_helper::test): Specialize for operand subclasses. (print_operand): Adjust to use is_a and as_a. Thanks, Prathamesh. Index: genmatch.c

Re: [GSoC][match-and-simplify] include is-a.h

2014-07-29 Thread Prathamesh Kulkarni
On Mon, Jul 28, 2014 at 7:30 PM, David Malcolm wrote: > On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote: >> - if (o->type == operand::OP_CAPTURE) >> + if (is_a (o)) >> { >> - capture *c = static_cast (o); >> - fprintf

[GSoC][match-and-simplify] split match.pd

2014-07-30 Thread Prathamesh Kulkarni
I have split match.pd in this patch. Not sure if I have written the ChangeLog correctly though... * match-bitwise.pd: New file. * match-plusminus.pd: Likewise. * match-constant-folding.pd: Likewise. * match-builtin.pd: Likewise. * match-rotate.pd): New file. Adjust to u

[GSoC][match-and-simplify] use dt_simplify::capture_max

2014-08-02 Thread Prathamesh Kulkarni
* genmatch.c (dt_simplify::gen_gimple): Use dt_simplify::capture_max. (dt_simplify::gen_generic): Likewise. Thanks, Prathamesh Index: genmatch.c === --- genmatch.c (revision 213343) +++ genmatch.c (working copy) @@ -1473,7 +1473

[GSoC][match-and-simplify] add pointerplus patterns

2014-08-04 Thread Prathamesh Kulkarni
Added patterns in associate_pointerplus and associate_pointerplus_diff. * genmatch.c (capture_max): Change value to 6. (match-plusminus.pd): Add new patterns. [gcc/testsuite/gcc.dg/tree-ssa] * match-plusminus.c (plusminus_9): New test-case. Thanks, Prathamesh Index: gcc/genmatch.c =

Re: [C PATCH] fix column number in comma expression warning

2014-04-19 Thread Prathamesh Kulkarni
I had sent this patch during stage-3 of gcc-4.9. Is the patch OK ? On Thu, Feb 20, 2014 at 6:26 PM, Marek Polacek wrote: > On Thu, Feb 20, 2014 at 05:52:09PM +0530, Prathamesh Kulkarni wrote: >> Show column number of left operand instead of comma operator >> in the warning "

Re: -Wvariadic-macros does not print warning

2014-04-23 Thread Prathamesh Kulkarni
forgot to add gcc-patches@gcc.gnu.org. Sorry for the double-post. On Wed, Apr 23, 2014 at 11:28 PM, Prathamesh Kulkarni wrote: > This is a follow up mail to > http://gcc.gnu.org/ml/gcc-help/2014-04/msg00096.html > I have attached patch that prints the warning when passed -Wvariadic-ma

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