Skip to content

Commit 93d358a

Browse files
committed
Add -Winline to the default CFLAGS for gcc, and remove
-Wold-style-definition, per recent discussion.
1 parent a5fecda commit 93d358a

File tree

2 files changed

+3
-57
lines changed

2 files changed

+3
-57
lines changed

configure

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,7 +2714,7 @@ else
27142714
fi
27152715

27162716
if test "$GCC" = yes; then
2717-
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
2717+
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
27182718

27192719
# Some versions of GCC support some additional useful warning flags.
27202720
# Check whether they are supported, and add them to CFLAGS if so.
@@ -2765,59 +2765,6 @@ else
27652765
echo "$as_me: failed program was:" >&5
27662766
sed 's/^/| /' conftest.$ac_ext >&5
27672767

2768-
CFLAGS="$pgac_save_CFLAGS"
2769-
echo "$as_me:$LINENO: result: no" >&5
2770-
echo "${ECHO_T}no" >&6
2771-
fi
2772-
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2773-
2774-
echo "$as_me:$LINENO: checking if $CC supports -Wold-style-definition" >&5
2775-
echo $ECHO_N "checking if $CC supports -Wold-style-definition... $ECHO_C" >&6
2776-
pgac_save_CFLAGS=$CFLAGS
2777-
CFLAGS="$pgac_save_CFLAGS -Wold-style-definition"
2778-
cat >conftest.$ac_ext <<_ACEOF
2779-
/* confdefs.h. */
2780-
_ACEOF
2781-
cat confdefs.h >>conftest.$ac_ext
2782-
cat >>conftest.$ac_ext <<_ACEOF
2783-
/* end confdefs.h. */
2784-
2785-
int
2786-
main ()
2787-
{
2788-
2789-
;
2790-
return 0;
2791-
}
2792-
_ACEOF
2793-
rm -f conftest.$ac_objext
2794-
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2795-
(eval $ac_compile) 2>conftest.er1
2796-
ac_status=$?
2797-
grep -v '^ *+' conftest.er1 >conftest.err
2798-
rm -f conftest.er1
2799-
cat conftest.err >&5
2800-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2801-
(exit $ac_status); } &&
2802-
{ ac_try='test -z "$ac_c_werror_flag"
2803-
|| test ! -s conftest.err'
2804-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805-
(eval $ac_try) 2>&5
2806-
ac_status=$?
2807-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808-
(exit $ac_status); }; } &&
2809-
{ ac_try='test -s conftest.$ac_objext'
2810-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2811-
(eval $ac_try) 2>&5
2812-
ac_status=$?
2813-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814-
(exit $ac_status); }; }; then
2815-
echo "$as_me:$LINENO: result: yes" >&5
2816-
echo "${ECHO_T}yes" >&6
2817-
else
2818-
echo "$as_me: failed program was:" >&5
2819-
sed 's/^/| /' conftest.$ac_ext >&5
2820-
28212768
CFLAGS="$pgac_save_CFLAGS"
28222769
echo "$as_me:$LINENO: result: no" >&5
28232770
echo "${ECHO_T}no" >&6

configure.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.426 2005/09/16 17:15:53 pgsql Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.427 2005/10/05 17:11:45 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -251,12 +251,11 @@ else
251251
fi
252252

253253
if test "$GCC" = yes; then
254-
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
254+
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
255255

256256
# Some versions of GCC support some additional useful warning flags.
257257
# Check whether they are supported, and add them to CFLAGS if so.
258258
PGAC_PROG_CC_CFLAGS_OPT([-Wdeclaration-after-statement])
259-
PGAC_PROG_CC_CFLAGS_OPT([-Wold-style-definition])
260259
PGAC_PROG_CC_CFLAGS_OPT([-Wendif-labels])
261260

262261
# Disable strict-aliasing rules; needed for gcc 3.3+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy