On 25/05/17 16:56 +0200, Jakub Jelinek wrote:
On Thu, May 25, 2017 at 03:52:47PM +0100, Jonathan Wakely wrote:
I'd probably write that like this instead:
void
foo (const void *p)
{
typedef const int* ptr_type;
ptr_type const q = (ptr_type) p;
ptr_type const r = (ptr_type) p;
(void) q;
(voi
On Thu, May 25, 2017 at 03:52:47PM +0100, Jonathan Wakely wrote:
> I'd probably write that like this instead:
>
> void
> foo (const void *p)
> {
> typedef const int* ptr_type;
> ptr_type const q = (ptr_type) p;
> ptr_type const r = (ptr_type) p;
> (void) q;
> (void) r;
> }
>
> It names the t
On 25/05/17 16:11 +0200, Jakub Jelinek wrote:
On Thu, May 25, 2017 at 03:02:42PM +0100, Jonathan Wakely wrote:
On 25/05/17 11:07 +0100, Jonathan Wakely wrote:
> On 25/05/17 10:05 +0200, Andreas Schwab wrote:
> > ../../gcc/ada/gcc-interface/utils2.c: In function 'int
compare_elmt_bitpos(const vo
On Thu, May 25, 2017 at 04:11:19PM +0200, Jakub Jelinek wrote:
> On Thu, May 25, 2017 at 03:02:42PM +0100, Jonathan Wakely wrote:
> > On 25/05/17 11:07 +0100, Jonathan Wakely wrote:
> > > On 25/05/17 10:05 +0200, Andreas Schwab wrote:
> > > > ../../gcc/ada/gcc-interface/utils2.c: In function 'int
On Thu, May 25, 2017 at 04:11:19PM +0200, Jakub Jelinek wrote:
> So, what can one do with typeof or similar to avoid the warning?
>
> void
> foo (const void *p)
> {
> const int *const q = (const int *const) p;
> typeof (q) r = (typeof (q)) p;
> (void) q;
> (void) r;
> }
>
> AFAIK typeof d
On Thu, May 25, 2017 at 03:02:42PM +0100, Jonathan Wakely wrote:
> On 25/05/17 11:07 +0100, Jonathan Wakely wrote:
> > On 25/05/17 10:05 +0200, Andreas Schwab wrote:
> > > ../../gcc/ada/gcc-interface/utils2.c: In function 'int
> > > compare_elmt_bitpos(const void*, const void*)':
> > > ../../gcc/a
On 25/05/17 11:07 +0100, Jonathan Wakely wrote:
On 25/05/17 10:05 +0200, Andreas Schwab wrote:
../../gcc/ada/gcc-interface/utils2.c: In function 'int
compare_elmt_bitpos(const void*, const void*)':
../../gcc/ada/gcc-interface/utils2.c:1937:73: error: type qualifiers ignored on
cast result type
On 25/05/17 10:05 +0200, Andreas Schwab wrote:
../../gcc/ada/gcc-interface/utils2.c: In function 'int
compare_elmt_bitpos(const void*, const void*)':
../../gcc/ada/gcc-interface/utils2.c:1937:73: error: type qualifiers ignored on
cast result type [-Werror=ignored-qualifiers]
const constructor
On 24/05/17 20:09 -0700, Andrew Pinski wrote:
On Wed, May 24, 2017 at 8:07 PM, Andrew Pinski wrote:
This change caused a bootstrap failure on aarch64-linux-gnu and
x86_64-linux-gnu:
In file included from ../../gcc/gcc/system.h:691:0,
from ../../gcc/gcc/read-rtl.c:31:
../../gcc/
../../gcc/ada/gcc-interface/utils2.c: In function 'int
compare_elmt_bitpos(const void*, const void*)':
../../gcc/ada/gcc-interface/utils2.c:1937:73: error: type qualifiers ignored on
cast result type [-Werror=ignored-qualifiers]
const constructor_elt * const elmt1 = (const constructor_elt * co
On Wed, May 24, 2017 at 8:07 PM, Andrew Pinski wrote:
> On Wed, May 24, 2017 at 12:29 PM, Jonathan Wakely wrote:
>> On 24/05/17 14:50 -0400, Jason Merrill wrote:
>>>
>>> On Wed, May 24, 2017 at 10:20 AM, Jonathan Wakely
>>> wrote:
On 23/05/17 16:26 -0400, Jason Merrill wrote:
>
>>>
On Wed, May 24, 2017 at 12:29 PM, Jonathan Wakely wrote:
> On 24/05/17 14:50 -0400, Jason Merrill wrote:
>>
>> On Wed, May 24, 2017 at 10:20 AM, Jonathan Wakely
>> wrote:
>>>
>>> On 23/05/17 16:26 -0400, Jason Merrill wrote:
On Tue, May 23, 2017 at 2:00 PM, Jonathan Wakely
wr
On 24/05/17 14:50 -0400, Jason Merrill wrote:
On Wed, May 24, 2017 at 10:20 AM, Jonathan Wakely wrote:
On 23/05/17 16:26 -0400, Jason Merrill wrote:
On Tue, May 23, 2017 at 2:00 PM, Jonathan Wakely
wrote:
On 19/05/17 15:14 -0400, Jason Merrill wrote:
On Thu, Apr 27, 2017 at 12:59 PM, Jo
On Wed, May 24, 2017 at 10:20 AM, Jonathan Wakely wrote:
> On 23/05/17 16:26 -0400, Jason Merrill wrote:
>>
>> On Tue, May 23, 2017 at 2:00 PM, Jonathan Wakely
>> wrote:
>>>
>>> On 19/05/17 15:14 -0400, Jason Merrill wrote:
On Thu, Apr 27, 2017 at 12:59 PM, Jonathan Wakely
wr
On 23/05/17 16:26 -0400, Jason Merrill wrote:
On Tue, May 23, 2017 at 2:00 PM, Jonathan Wakely wrote:
On 19/05/17 15:14 -0400, Jason Merrill wrote:
On Thu, Apr 27, 2017 at 12:59 PM, Jonathan Wakely
wrote:
I also tried to add a warning like EDG's (see the PR) but it gave a
false positive fo
On Tue, May 23, 2017 at 2:00 PM, Jonathan Wakely wrote:
> On 19/05/17 15:14 -0400, Jason Merrill wrote:
>>
>> On Thu, Apr 27, 2017 at 12:59 PM, Jonathan Wakely
>> wrote:
>>>
>>> I also tried to add a warning like EDG's (see the PR) but it gave a
>>> false positive for direct-list-init of scoped e
On 23/05/17 13:58 -0400, Nathan Sidwell wrote:
On 05/23/2017 01:56 PM, Jonathan Wakely wrote:
On 18/05/17 13:44 -0400, Nathan Sidwell wrote:
References can't be CV qualified, so the REFERENCE_TYPE check
seems superfluous?
True. I did it because that matches the semantics of the cast
accordi
On 19/05/17 15:14 -0400, Jason Merrill wrote:
On Thu, Apr 27, 2017 at 12:59 PM, Jonathan Wakely wrote:
I also tried to add a warning like EDG's (see the PR) but it gave a
false positive for direct-list-init of scoped enums (P0138R2, r240449)
because that code goes through build_c_cast to perfor
On 05/23/2017 01:56 PM, Jonathan Wakely wrote:
On 18/05/17 13:44 -0400, Nathan Sidwell wrote:
References can't be CV qualified, so the REFERENCE_TYPE check seems
superfluous?
True. I did it because that matches the semantics of the cast
according to the standard, but it isn't needed here. Is
On 18/05/17 13:44 -0400, Nathan Sidwell wrote:
On 05/18/2017 01:40 PM, Jonathan Wakely wrote:
+ /* A prvalue of non-class type is cv-unqualified. */
+ if (TREE_CODE (type) != REFERENCE_TYPE && !CLASS_TYPE_P (type))
+type = cv_unqualified (type);
+
References can't be CV qualified, so t
On Thu, Apr 27, 2017 at 12:59 PM, Jonathan Wakely wrote:
> I also tried to add a warning like EDG's (see the PR) but it gave a
> false positive for direct-list-init of scoped enums (P0138R2, r240449)
> because that code goes through build_c_cast to perform the conversion,
> so looks like a cast to
On 05/18/2017 01:40 PM, Jonathan Wakely wrote:
+ /* A prvalue of non-class type is cv-unqualified. */
+ if (TREE_CODE (type) != REFERENCE_TYPE && !CLASS_TYPE_P (type))
+type = cv_unqualified (type);
+
References can't be CV qualified, so the REFERENCE_TYPE check seems
superfluous?
na
Ping for https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01414.html ...
On 27/04/17 17:59 +0100, Jonathan Wakely wrote:
This is probably not the best way to do this, but it seems to work.
I also tried to add a warning like EDG's (see the PR) but it gave a
false positive for direct-list-init of sc
Hi,
On 27/04/2017 18:59, Jonathan Wakely wrote:
This is probably not the best way to do this, but it seems to work.
Eventually, if this is the way to go, a small maybe_strip_* helper could
tidy a bit the code...
Paolo.
This is probably not the best way to do this, but it seems to work.
I also tried to add a warning like EDG's (see the PR) but it gave a
false positive for direct-list-init of scoped enums (P0138R2, r240449)
because that code goes through build_c_cast to perform the conversion,
so looks like a cas
25 matches
Mail list logo