Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2001 02:21:02 +0200 (CEST)
From:      marcolz@ilse.nl
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        sys@ilse.nl
Subject:   gnu/26827: gcc warning about strftime's '%+'
Message-ID:  <200104250021.f3P0L2718571@serv4.ilse.nl>

next in thread | raw e-mail | index | archive | help

>Number:         26827
>Category:       gnu
>Synopsis:       gcc doesn't know about '%+' in formatstring of strftime()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 24 17:30:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Marc Olzheim
>Release:        FreeBSD 4.3-RC i386
>Organization:
ilse technology
>Environment:
System: FreeBSD serv4.ilse.nl 4.3-RC FreeBSD 4.3-RC #0: Thu Apr 19 10:48:44 CEST 2001 marcolz@serv4.ilse.nl:/usr/src/sys/compile/serv4 i386


	
>Description:
gcc warns when using '%+' in a formatstring when using strftime(), although
libc knows it.
>How-To-Repeat:
Any piece of code containing something like
strftime(buffer, sizeof(buffer), "%+", localtime(&(sb.st_mtime)));
compiled with with -Wall
>Fix:
--- /usr/src/contrib/gcc/c-common.c	Wed Apr 25 02:03:07 2001
+++ /usr/src/contrib/gcc/c-common.c	Wed Apr 25 02:05:37 2001
@@ -1155,7 +1155,7 @@
   { "D", 		0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "2" },
   { "g", 		0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "2O-_0w" },
   { "cx", 		0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "3E" },
-  { "%RTXnrt",		0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "" },
+  { "%+RTXnrt",		0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "" },
   { "P",		0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "G" },
   { "HIMSUWdemw",	0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "-_0Ow" },
   { "Vju",		0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "-_0Oow" },
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104250021.f3P0L2718571>