The recently introduced -Wstringop-truncation warning relies
on the new nonstring attribute to allow the historical use case
of calling strncpy to completely fill the destination with a copy
of a string without adding a terminating nul. Glibc is currently
considering making use of the attribute t
On 13 November 2017 01:52:41 CET, Martin Sebor wrote:
s/^\(he array\)/t\1/
thanks,
On Sun, Nov 12, 2017 at 05:52:41PM -0700, Martin Sebor wrote:
> + the referenced enclosing object or pointer. Otherwise return
> + null. */
> +
> +tree
> +get_attr_nonstring_decl (tree expr, tree *ref)
> +{
> + tree dcl = expr;
Usually we call vars decl, not dcl.
Or what does it stand for?
On 11/13/2017 12:20 PM, Jakub Jelinek wrote:
On Sun, Nov 12, 2017 at 05:52:41PM -0700, Martin Sebor wrote:
+ the referenced enclosing object or pointer. Otherwise return
+ null. */
+
+tree
+get_attr_nonstring_decl (tree expr, tree *ref)
+{
+ tree dcl = expr;
Usually we call vars decl, n
Attached is an improved version that rather than hardcoding
the built-in functions to check uses the constness of each
built-in's char* argument as a trigger to do the checking.
This avoids the problem of the list being incomplete either
by omission or due to getting out of sync, and also makes i
On 11/13/2017 06:21 PM, Martin Sebor wrote:
> Attached is an improved version that rather than hardcoding
> the built-in functions to check uses the constness of each
> built-in's char* argument as a trigger to do the checking.
>
> This avoids the problem of the list being incomplete either
> by o
On Thu, Nov 16, 2017 at 05:15:20PM -0700, Jeff Law wrote:
> > + tree_code code = gimple_assign_rhs_code (def);
> > + if (code == ADDR_EXPR
> > + || code == COMPONENT_REF
> > + || code == VAR_DECL)
> > + dcl = gimple_assign_rhs1 (def);
> Note that CO
On 11/16/2017 05:15 PM, Jeff Law wrote:
On 11/13/2017 06:21 PM, Martin Sebor wrote:
Attached is an improved version that rather than hardcoding
the built-in functions to check uses the constness of each
built-in's char* argument as a trigger to do the checking.
This avoids the problem of the li
On 11/16/2017 05:15 PM, Jeff Law wrote:
On 11/13/2017 06:21 PM, Martin Sebor wrote:
Attached is an improved version that rather than hardcoding
the built-in functions to check uses the constness of each
built-in's char* argument as a trigger to do the checking.
This avoids the problem of the li
On 11/17/2017 12:47 AM, Jakub Jelinek wrote:
On Thu, Nov 16, 2017 at 05:15:20PM -0700, Jeff Law wrote:
+ tree_code code = gimple_assign_rhs_code (def);
+ if (code == ADDR_EXPR
+ || code == COMPONENT_REF
+ || code == VAR_DECL)
+
On 11/19/2017 10:06 AM, Martin Sebor wrote:
>>> +/* If EXPR refers to a character array or pointer declared attribute
>>> + nonstring return a decl for that array or pointer and set *REF to
>>> + the referenced enclosing object or pointer. Otherwise returns
>>> + null. */
>> Generally we'd
I have seen it in the early IL but this late I couldn't come
up with a test case where such a loop would be necessary.
The COMPONENT_REF always refers to the member array. If you
can show me an example to test with I'll add the handling if
possible. There are cases where it isn't, such as in
On 11/19/2017 03:26 PM, Martin Sebor wrote:
>>> I have seen it in the early IL but this late I couldn't come
>>> up with a test case where such a loop would be necessary.
>>> The COMPONENT_REF always refers to the member array. If you
>>> can show me an example to test with I'll add the handling i
13 matches
Mail list logo