From fanf@dotat.at  Mon Mar  4 10:40:40 2002
Return-Path: <fanf@dotat.at>
Received: from hand.dotat.at (host217-35-46-127.in-addr.btopenworld.com [217.35.46.127])
	by hub.freebsd.org (Postfix) with ESMTP id C5E0137B400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  4 Mar 2002 10:40:39 -0800 (PST)
Received: from fanf by hand.dotat.at with local (Exim 3.35 #1)
	id 16hxNW-0006mb-00; Mon, 04 Mar 2002 18:40:06 +0000
Message-Id: <E16hxNW-0006mb-00@hand.dotat.at>
Date: Mon, 04 Mar 2002 18:40:06 +0000
From: Tony Finch <dot@dotat.at>
Reply-To: Tony Finch <dot@dotat.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Tony Finch <dot@dotat.at>
Subject: BDECFLAGS needs -U__STRICT_ANSI__
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35542
>Category:       misc
>Synopsis:       [build] [patch] BDECFLAGS needs -U__STRICT_ANSI__
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bde
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 04 10:50:01 PST 2002
>Closed-Date:    
>Last-Modified:  Tue Nov 23 23:51:38 UTC 2010
>Originator:     Tony Finch
>Release:        FreeBSD 4.5-STABLE-20020220 i386
>Organization:
dotat labs
>Environment:
System: FreeBSD hand.dotat.at 4.5-STABLE-20020220 FreeBSD 4.5-STABLE-20020220 #15: Wed Feb 20 07:46:52 GMT 2002 fanf@hand.dotat.at:/FreeBSD/obj/FreeBSD/releng4/sys/SHARP i386
>Description:
In environments where the system headers are aware of the compilation
environment that the program desires, using gcc -ansi may disable all
the Unix definitions, which is rather unhelpful for flag settings
intended for Unix programs.
>How-To-Repeat:
Try compiling with $BDECFLAGS a program that uses functions like asprintf().
On Linux (for example) this fails because asprintf() is in the C standard.
>Fix:

Index: make.conf
===================================================================
RCS file: /home/ncvs/src/share/examples/etc/make.conf,v
retrieving revision 1.179
diff -u -r1.179 make.conf
--- make.conf	17 Feb 2002 22:10:05 -0000	1.179
+++ make.conf	4 Mar 2002 18:31:41 -0000
@@ -55,8 +55,8 @@
 # putting "CFLAGS+=${BDECFLAGS}" in /etc/make.conf.  -Wconversion is not
 # included here due to compiler bugs, eg: mkdir()'s mode_t argument.
 #
-#BDECFLAGS=	-W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \
-#		-Wcast-qual -Wchar-subscripts -Winline \
+#BDECFLAGS=	-ansi -U__STRICT_ANSI__ -pedantic -W -Wall -Wbad-function-cast \
+#		-Wcast-align -Wcast-qual -Wchar-subscripts -Winline \
 #		-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
 #		-Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings
 #
>Release-Note:
>Audit-Trail:

From: Tony Finch <dot@dotat.at>
To: freebsd-gnats-submit@FreeBSD.org, dot@dotat.at
Cc:  
Subject: Re: misc/35542: BDECFLAGS needs -U__STRICT_ANSI__
Date: Mon, 04 Mar 2002 19:09:48 +0000

 Um, I meant that asprintf() is NOT in the C standard.
 
 
Responsible-Changed-From-To: freebsd-bugs->bde 
Responsible-Changed-By: dd 
Responsible-Changed-When: Fri Mar 8 19:54:48 PST 2002 
Responsible-Changed-Why:  
BDE should probably decide what goes in BDECFLAGS. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=35542 
State-Changed-From-To: open->feedback 
State-Changed-By: arundel 
State-Changed-When: Tue Nov 23 23:48:06 UTC 2010 
State-Changed-Why:  
Bruce, can we close this PR? It seems with FreeBSD moving on to clang the 
BDECFLAGS can either be removed from make.conf or should be revised. Even with 
gcc 4.2.1 it is not certain, if these flags are really still recommended. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35542 
>Unformatted:
