------- Comment #10 from rguenth at gcc dot gnu dot org  2008-01-03 15:54 
-------
"Fixed" only in the sense that we now create

 <pointer_plus_expr 0x2b6e7ed3b1c0
    type <pointer_type 0x2b6e7eda3000
        type <integer_type 0x2b6e7ed8c300 char public string-flag QI
            size <integer_cst 0x2b6e7ed7c7e0 constant invariant 8>
            unit size <integer_cst 0x2b6e7ed7c810 constant invariant 1>
            align 8 symtab 0 alias set -1 canonical type 0x2b6e7ed8c300
precision 8 min <integer_cst 0x2b6e7ed7c780 -128> max <integer_cst
0x2b6e7ed7c8d0 127>
            pointer_to_this <pointer_type 0x2b6e7eda3000>>
        unsigned DI
        size <integer_cst 0x2b6e7ed7cb70 constant invariant 64>
        unit size <integer_cst 0x2b6e7ed7cba0 constant invariant 8>
        align 64 symtab 0 alias set -1 canonical type 0x2b6e7eda3000>

    arg 0 <parm_decl 0x2b6e7ed82240 p type <pointer_type 0x2b6e7eda3000>
        used unsigned DI file t.i line 1 col 17 size <integer_cst
0x2b6e7ed7cb70 64> unit size <integer_cst 0x2b6e7ed7cba0 8>
        align 64 context <function_decl 0x2b6e7ee72b60 foo> initial
<pointer_type 0x2b6e7eda3000> arg-type <pointer_type 0x2b6e7eda3000>>
    arg 1 <integer_cst 0x2b6e7f709600 type <integer_type 0x2b6e7ed8c000 long
unsigned int> constant invariant public overflow -4>>

but I consider the 'overflow' bit set on the -4 a bug.  Also POINTER_PLUS_EXPR
does not in any way change the issues we raised with undefinedness of
overflow in pointer + offset expressions.

Now, Joseph says

> This bug is about the interpretation of GCC's internal representation, not 
> that of the standard.

where yes, we seem to agreed to having an unsigned offset argument to
POINTER_PLUS_EXPR which we need to interpret as a signed quantity.  And
in a different place we sort-of agreed to limit the maximum object size
gcc handles to half of SIZE_T_MAX.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27214

Reply via email to