This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
> -----Original Message----- > From: Jason Merrill [mailto:jason@redhat.com] > Sent: Saturday, August 17, 2013 12:55 AM > To: Iyer, Balaji V; Rainer Orth > Cc: Jakub Jelinek; gcc-patches@gcc.gnu.org; Marek Polacek > (polacek@redhat.com) > Subject: Re: [PATCH] Fix for PR c/57490 > > On 08/16/2013 02:13 PM, Iyer, Balaji V wrote: > >>> + /* If it is a built-in array notation function, then the return type of > >>> + the function is the type of the array passed in as array notation. */ > >> > >> How can the function return an array? > > > > float x, A[10]; > > x = __sec_reduce_add (A[:]); // The sec_reduce_add function's return type is > the type of A[] which is float. > > Ah, then the comment should say "...is the element type of the array...". Thanks. Here is a fixed patch. Is this Ok for trunk? Here are the ChangeLog entries gcc/c/ChangeLog 2013-08-18 Balaji V. Iyer <balaji.v.iyer@intel.com> PR c/57490 * c-array-notation.c (fix_conditional_array_notations_1): Added a check for truth values. (expand_array_notation_exprs): Added truth values case. Removed an unwanted else. Added for-loop to walk through subtrees in default case. gcc/cp/ChangeLog 2013-08-18 Balaji V. Iyer <balaji.v.iyer@intel.com> PR c/57490 * cp-array-notation.c (cp_expand_cond_array_notations): Added a check for truth values. (expand_array_notation_exprs): Added truth values case. Removed an unwanted else. Added for-loop to walk through subtrees in default case. * typeck.c (cp_build_binary_op): Inherited the type of the array notation for built-in array notation functions. gcc/testsuite/ChangeLog 2013-08-18 Balaji V. Iyer <balaji.v.iyer@intel.com> PR c/57490 * c-c++-common/cilk-plus/AN/pr57490.c: New test. sincerely, Balaji V. Iyer. > > Jason
Attachment:
patch_pr57490.txt
Description: patch_pr57490.txt
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |