From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Problems with printf() Date: 24 Apr 2001 18:51:51 GMT Organization: Aachen University of Technology (RWTH) Lines: 24 Message-ID: <9c4i07$ngh$1@nets3.rz.RWTH-Aachen.DE> References: <9c4fod$psq$1 AT taliesin DOT netcom DOT net DOT uk> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 988138311 24081 137.226.32.75 (24 Apr 2001 18:51:51 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 24 Apr 2001 18:51:51 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Matt Bayliss wrote: > Hi there, > I'm using DJGPP (gcc version 2.95 19990728 (release) ) A somewhat outdated release. You may want to upgrade to 2.95.2 or higher. > and when I try the following statement: > printf("\nLength of string = %U\n", (strlen(buffer)) ); > I get the error message: > strlen.c:16: warning: unknown conversion type character `U' in format Note that this is _not_ an error message. It's just a warning, and you get it because unlike the docs, or our library *GCC* itself does not know about 'U' format in *printf() functions. That's not a surprise, either --- it's a nonstandard format. Use the standardized format specifier "%lu" instead, and both you and GCC will be happy with it. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.