[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem in Tru64 with autoconf choosen cc flags [PATCH]
From: |
Paul Eggert |
Subject: |
Re: Problem in Tru64 with autoconf choosen cc flags [PATCH] |
Date: |
15 Jan 2004 10:22:34 -0800 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Nicolás Lichtmaier <address@hidden> writes:
> $ cc -o test test.c
> ./test
> 3158136
> $ cc -std -o test test.c
> ./test
> 0
That's odd. The standards(5) man page for Tru64 5.1
<http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51_HTML/MAN/MAN5/0001____.HTM>
says "the cc command includes the -std flag by default". Is this
incorrect?
At any rate, I don't see how it hurts to use -std rather than -std1,
given the described symptoms, so I installed the following patch.
2004-01-15 Paul Eggert <address@hidden>
* lib/autoconf/c.m4 (_AC_PROG_CC_STDC): Try -std, not -std1, since
-std1 disables some useful extensions on Tru64. Problem reported
by N. Lichtmaier in
<http://mail.gnu.org/archive/html/autoconf/2004-01/msg00100.html>.
Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.183
diff -p -u -r1.183 c.m4
--- lib/autoconf/c.m4 23 Sep 2003 23:05:11 -0000 1.183
+++ lib/autoconf/c.m4 15 Jan 2004 18:17:15 -0000
@@ -1,6 +1,6 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Programming languages support.
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -824,10 +824,10 @@ static char *f (char * (*g) (char **, in
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
+ as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
+ that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
int test (int i, double x);
@@ -840,11 +840,11 @@ char **argv;]],
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
+# Ultrix, OSF/1, Tru64 -std
# HP-UX 10.20 and later -Ae
# HP-UX older versions -Aa -D_HPUX_SOURCE
# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc
-D__EXTENSIONS__"
+for ac_arg in "" -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc
-D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
_AC_COMPILE_IFELSE([],
Re: Problem in Tru64 with autoconf choosen cc flags [PATCH], Kevin Ryde, 2004/01/14