GNU bug report logs - #55895
[PATCH] maint: Fix ptr_align signature to silence -Wmaybe-uninitialized

Previous Next

Package: coreutils;

Reported by: Anders Kaseorg <andersk <at> mit.edu>

Date: Fri, 10 Jun 2022 22:31:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #28 received at 55895 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Anders Kaseorg <andersk <at> mit.edu>
Cc: 55895 <at> debbugs.gnu.org
Subject: Re: bug#55895: [PATCH] maint: Fix ptr_align signature to silence
 -Wmaybe-uninitialized
Date: Sat, 11 Jun 2022 17:14:47 -0700
On 6/11/22 14:18, Anders Kaseorg wrote:

> if you align the mutable pointer, you don’t need to separately align a const pointer.

Of course one can alter code by aligning a mutable pointer first and 
then converting it to a const pointer, instead of first converting it to 
const and then aligning the result. But that might not be convenient. 
The part of the code that needs alignment might have access to only the 
const pointer, and should be able to align the const pointer on its own 
without bothering the part of the code that doesn't need alignment.

Anyway, we're getting a long way from the original bug report. I'll let 
you have the last word on this tangential topic, if you like.




This bug report was last modified 2 years and 341 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.