Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* gcc-2.96 problem under rh70
@ 2001-02-06 13:58 Georg Wittig
  2001-02-06 15:32 ` Matt Wilson
  2001-02-06 15:55 ` gcc-2.96 problem under rh70 Michal Jaegermann
  0 siblings, 2 replies; 7+ messages in thread
From: Georg Wittig @ 2001-02-06 13:58 UTC (permalink / raw)
  To: axp-list

The following program doesn't compile with gcc-2.96:

---------------------------------
#include <stdarg.h>
#include <varargs.h>

demo(int dummy1, ...){
  va_list dummy2;
  va_start(dummy2, dummy1);
}
---------------------------------
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/include/varargs.h:66:17: warning: "va_start" redefined
/usr/lib/gcc-lib/alpha-redhat-linux/2.96/include/stdarg.h:54:1: warning: this is the location of the previous definition
test.c:6:26: too many arguments for macro "va_start"
---------------------------------

Of course, this isn't a real program, but an excerpt from a bigger
program to nail down the problem. That program used to compile and
work under RH >= 4.2 on all the Alphas, but no longer under RH70.

	$ rpm -qa | grep gcc
	gcc-c++-2.96-69
	gcc-2.96-69
	$ uname -r
	2.2.17-4
	$ grep platform /proc/cpuinfo
	platform string         : COMPAQ Professional Workstation XP1000
	$ cat /etc/redhat-release
	Red Hat Linux release 7.0 (Guinness)
	$ 

Suggestions how to work-around that problem until the bug is fixed are
welcome. Thanks in advance for your help.


-- 
Georg Wittig, GMD				Georg.Wittig@gmd.de
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A lot of time has been wasted arguing over what came first --
the chicken or the egg. It was undoubtedly the rooster.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc-2.96 problem under rh70
  2001-02-06 13:58 gcc-2.96 problem under rh70 Georg Wittig
@ 2001-02-06 15:32 ` Matt Wilson
  2001-02-07 12:59   ` Georg Wittig
  2001-02-06 15:55 ` gcc-2.96 problem under rh70 Michal Jaegermann
  1 sibling, 1 reply; 7+ messages in thread
From: Matt Wilson @ 2001-02-06 15:32 UTC (permalink / raw)
  To: axp-list

There are many cases where the new compiler is a bit more strict
and/or pedantic.  Why are you including varargs.h?  You're using the
ANSI C va_start, etc macros.  If you include varargs.h you get the old
compatibility macros:

from "man va_start"

COMPATIBILITY
       These macros are not compatible with the  historic  macros
       they  replace.  A backward compatible version can be found
       in the include file varargs.h.

varargs.h now blows away the stdargs.h macros (at least in the gcc
build I have here, which is in rawhide).  But this will also make your
program build because va_start only takes one argument in the old
style.

So, in short, remove the varargs.h include - stick with stdarg.h

Cheers,

Matt

On Tue, Feb 06, 2001 at 02:58:01PM +0100, Georg Wittig wrote:
> The following program doesn't compile with gcc-2.96:
> 
> ---------------------------------
> #include <stdarg.h>
> #include <varargs.h>
> 
> demo(int dummy1, ...){
>   va_list dummy2;
>   va_start(dummy2, dummy1);
> }
> ---------------------------------
> /usr/lib/gcc-lib/alpha-redhat-linux/2.96/include/varargs.h:66:17: warning: "va_start" redefined
> /usr/lib/gcc-lib/alpha-redhat-linux/2.96/include/stdarg.h:54:1: warning: this is the location of the previous definition
> test.c:6:26: too many arguments for macro "va_start"
> ---------------------------------
> 
> Of course, this isn't a real program, but an excerpt from a bigger
> program to nail down the problem. That program used to compile and
> work under RH >= 4.2 on all the Alphas, but no longer under RH70.
> 
> 	$ rpm -qa | grep gcc
> 	gcc-c++-2.96-69
> 	gcc-2.96-69
> 	$ uname -r
> 	2.2.17-4
> 	$ grep platform /proc/cpuinfo
> 	platform string         : COMPAQ Professional Workstation XP1000
> 	$ cat /etc/redhat-release
> 	Red Hat Linux release 7.0 (Guinness)
> 	$ 
> 
> Suggestions how to work-around that problem until the bug is fixed are
> welcome. Thanks in advance for your help.
> 
> 
> -- 
> Georg Wittig, GMD				Georg.Wittig@gmd.de
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> A lot of time has been wasted arguing over what came first --
> the chicken or the egg. It was undoubtedly the rooster.
> 
> 
> 
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc-2.96 problem under rh70
  2001-02-06 13:58 gcc-2.96 problem under rh70 Georg Wittig
  2001-02-06 15:32 ` Matt Wilson
@ 2001-02-06 15:55 ` Michal Jaegermann
  1 sibling, 0 replies; 7+ messages in thread
From: Michal Jaegermann @ 2001-02-06 15:55 UTC (permalink / raw)
  To: axp-list

On Tue, Feb 06, 2001 at 02:58:01PM +0100, Georg Wittig wrote:
> The following program doesn't compile with gcc-2.96:
> 
> ---------------------------------
> #include <stdarg.h>
> #include <varargs.h>
.....

Eh?  Why it should?  This is not a valid C!  You are trying to mix
a standard header <stdarg.h> with an obsolete <varargs.h> which is
provided only for backward compatibility for old sources.

In other words you attempt to use at the same time two different,
incompatible, implementations of variable arguments functions and what
you can possibly get out of there is clearly undefined.  It may even
work if you are (un)lucky enough.  OTOH you cannot predict that it will
not launch 'nethack' if it will compile.  Standard documents explicitely
say that "using #undef on va_start and va_args macros leads to
_undefined behaviour_".  They are indeed numb on attempts of a
redefinition but this is effectively an "#undef" as well.  What is even
worse results _may_ be different if you will switch an order of these
two "#include" lines above.

It is quite possible that some compilers may swallow that but I can
only be happy for the one which will barf on this obvious programmer
error.  If you want a code which is acceptable to pre-Standard
compilers then use some configuration means and provide two different
implementations compiled conditionally.

  Michal




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc-2.96 problem under rh70
  2001-02-06 15:32 ` Matt Wilson
@ 2001-02-07 12:59   ` Georg Wittig
  2001-02-07 16:12     ` PCi64 memory Speedracer
  0 siblings, 1 reply; 7+ messages in thread
From: Georg Wittig @ 2001-02-07 12:59 UTC (permalink / raw)
  To: axp-list

Matt Wilson wrote:


> There are many cases where the new compiler is a bit more strict
> and/or pedantic.  Why are you including varargs.h?


Well, I didn't write that program myself; I downloaded it from some
FTP server. The #include statements are in some complicated *.h files
that are partially configured by the GNU configure script and
partially hand crafted by the author of the program. Include level 3
or 4 will include stdarg.h and later on varargs.h. I tried to comment
out the "#include varargs.h" line, but then gcc will complain heavily
at another point. Alas, it's not trivial to change that program
without deeper knowledge of it's internals.


-- 
Georg Wittig, GMD				Georg.Wittig@gmd.de
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A lot of time has been wasted arguing over what came first --
the chicken or the egg. It was undoubtedly the rooster.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* PCi64 memory
  2001-02-07 12:59   ` Georg Wittig
@ 2001-02-07 16:12     ` Speedracer
  2001-02-07 16:32       ` Jay Estabrook
  0 siblings, 1 reply; 7+ messages in thread
From: Speedracer @ 2001-02-07 16:12 UTC (permalink / raw)
  To: axp-list

I have a PC164 with 4 slots open, I have 2 64mb chips and 2 32s
Will the system accept this odd combination or do all four slots have to
be the same?  Can I just populate 6 slots?  Anyone have any used memory
they want to seel cheap?

\--------------------------------------------------------------------------/
 \ Aaron Gee AKA Spdracer                                                 /
  \"Maseratis are more than cars, they are a passion that is understood  /
   \by some, but enjoyed by a very few"	                                /
    \URL---> http://www.italian-cars.com                               /
     \e-mail--> spdracer@america.com   Fax-->1 (904) 446 1186         /
      \--------------------------------------------------------------/
				\  |  /
				 \_|_/
				 (---)
				   0 




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PCi64 memory
  2001-02-07 16:12     ` PCi64 memory Speedracer
@ 2001-02-07 16:32       ` Jay Estabrook
  2001-02-07 20:11         ` geerten kuiper
  0 siblings, 1 reply; 7+ messages in thread
From: Jay Estabrook @ 2001-02-07 16:32 UTC (permalink / raw)
  To: axp-list

On Wed, Feb 07, 2001 at 11:12:30AM -0500, Speedracer wrote:
> 
> I have a PC164 with 4 slots open, I have 2 64mb chips and 2 32s
> Will the system accept this odd combination or do all four slots have to
> be the same?  Can I just populate 6 slots?  Anyone have any used memory
> they want to seel cheap?

Banks are 4 slots each on PC164, and the DIMMS in a bank MUST BE all
the same size (at least).

--Jay++

-----------------------------------------------------------------------------
Jay A Estabrook                            Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20         (508) 467-2080
200 Forest Street, Marlboro MA 01752       Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PCi64 memory
  2001-02-07 16:32       ` Jay Estabrook
@ 2001-02-07 20:11         ` geerten kuiper
  0 siblings, 0 replies; 7+ messages in thread
From: geerten kuiper @ 2001-02-07 20:11 UTC (permalink / raw)
  To: axp-list

>On Wed, Feb 07, 2001 at 11:12:30AM -0500, Speedracer wrote:
>> 
>> I have a PC164 with 4 slots open, I have 2 64mb chips and 2 32s
>> Will the system accept this odd combination or do all four slots have to
>> be the same?  Can I just populate 6 slots?  Anyone have any used memory
>> they want to seel cheap?

At 11:32 7-2-2001 -0500, Jay replied:
>
>Banks are 4 slots each on PC164, and the DIMMS in a bank MUST BE all
>the same size (at least).
>

Worse than that: all 8 SIMMs must be the same size. You can only utilize
all eight slots when you jumper the memory path to be 256 bits wide.
(That's on the PC164 I happen to have: not SX or LX.)
The SIMMs I can offer are 16Mb (4 of them) Let me know if they're any use
to you.

Groeten,
Geerten.

Geerten Kuiper            |  "It is customary to append a signature or 
Corn. Houtmanstraat 113   |   .sig to a mail message, usually containing 
2593 RG   Den Haag        |   information on the author, along with a 
Nederland                 |   joke or a motto."
                          |                                Olaf Kirch
                          |        LINUX Network Administrators Guide




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-02-07 20:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-06 13:58 gcc-2.96 problem under rh70 Georg Wittig
2001-02-06 15:32 ` Matt Wilson
2001-02-07 12:59   ` Georg Wittig
2001-02-07 16:12     ` PCi64 memory Speedracer
2001-02-07 16:32       ` Jay Estabrook
2001-02-07 20:11         ` geerten kuiper
2001-02-06 15:55 ` gcc-2.96 problem under rh70 Michal Jaegermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox