On May 9, 2016 3:40 PM Philip Oakley wrote:
> From: "Stefan Beller" <sbel...@google.com>
> > On Fri, May 6, 2016 at 12:57 PM, Junio C Hamano <gits...@pobox.com>
> wrote:
> >> Marc Branchaud <marcn...@xiplink.com> writes:
> >>
> >>> On 2016-05-06 02:54 PM, Junio C Hamano wrote:
> >>>>
> >>>> I wonder if can we come up with a short and sweet notation to
> >>>> remind futhre readers that this "initialization" is not
> >>>> initializing but merely squelching warnings from stupid compilers,
> >>>> and agree to use it consistently?
> >>>
> >>> Perhaps
> >>>
> >>>       #define COMPILER_UNINITIALIZED_WARNING_INITIALIZER 0
> >>>
> >>> or, for short-and-sweet
> >>>
> >
> >           /* Here could go a longer explanation than the 4 character
> > define :) */
> >>>       #define CUWI 0
> >>>
> >>> ?
> >>>
> >>> :)
> >>
> >> I get that smiley.
> >>
> >> I was hinting to keep the /* compiler workaround */ comment, but in a
> >> bit shorter form.
> >> --
> 
> For some background, I found $gmane/169098/focus=169104 which covers
> some of the issues (the focused msg is one from Junio). Hannes then notes
> ($gmane/169121) that the current xx = xx; could be seen as possible
> undefined behaviour - perhaps one of those 'no good solution' problems.
> 
> Perhaps a suitable name...
> 
> #define SUPPRESS_COMPILER_UNINITIALIZED_WARNING 0
> /* Use when some in-use compiler is unable to determine if the variable is
> used uninitialized, and no good default value is available */
> 
> Though, where best to put it?

I would suggest this type of approach should be detected in the configure 
script and added automagically (as best as possible) or as a hint supplied by 
the platform's own specific configuration files if necessary as a last gasp.

-- Brief whoami: NonStop&UNIX developer since approximately 
UNIX(421664400)/NonStop(211288444200000000)
-- In my real life, I talk too much.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to