This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Support %m in printf functions


On Jan 12 09:20, Schwarz, Konrad wrote:
> > > IMHO, it doesn't feel right to add __CYGWIN__ here since the %m
> > > functionality is sufficiently target agnostic to be useful for
> > > everyone who would like to use it.  I guess _GLIBC_EXTENSION sounds
> > > about right, but maybe it should be _NO_GLIBC_EXTENSIONS instead and
> > > only set it for builds which explicitely don't want them?
> > 
> > We should also guard the %s conversion of NULL to "(null)" rather than
> > dumping core under the same flag (right now, that appears to be under
> > __OPTIMIZE_SIZE__).
> 
> GLIBC conversion of NULL to "(null)" has delayed detection of a bug in
> code of mine.  I would much prefer %s conversion to dump
> core, either as a side effect of dereferencing NULL or by call of abort().

Strange.  It had already helped me a lot since it doesn't just crash
at some point in the C library, but the unexpected string value showed
pretty clearly what the bug was.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]