Date: Mon, 04 Mar 2002 18:40:06 +0000 From: Tony Finch <dot@dotat.at> To: FreeBSD-gnats-submit@freebsd.org Cc: Tony Finch <dot@dotat.at> Subject: misc/35542: BDECFLAGS needs -U__STRICT_ANSI__ Message-ID: <E16hxNW-0006mb-00@hand.dotat.at>
next in thread | raw e-mail | index | archive | help
>Number: 35542
>Category: misc
>Synopsis: BDECFLAGS needs -U__STRICT_ANSI__
>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: Mon Mar 04 10:50:01 PST 2002
>Closed-Date:
>Last-Modified:
>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:
>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?E16hxNW-0006mb-00>
