From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199606032113.RAA16529@mailhost.intac.com> Date: Mon, 3 Jun 1996 17:13:41 -0400 (EDT) From: Brian Wood Subject: gcc question OK gcc gurus (defined as: anyone who knows more than me, which is just about everybody): Here's my problem: I am trying to compile mgetty on my UDB, running kernel 1.3.89 and using gcc version 2.7.2. This setup has successfully compiled dozens of other programs with little or no trouble. Everything goes along swimingly until it tries to compile conf_mg.c. I get several warnings like: warning: initializer element for c.port_owner.d.l is not computable at load time After several of these errors (the filename is different in each of course) I get make *** [conf_mg.o] error 1 The code which is apparently causing the trouble is an "initialized union" and looks like this: struct conf_data_mgetty c = { { "speed", DEFAULT_PORTSPEED, CT_INT, C_PRESET }, (SEVERAL SIMILAR LINES) { "port-owner", (int) DEVICE_OWNER, CT_STRING, C_PRESET }, (SEVERAL SIMILAR LINES) Of the dozens of lines in this structure, only the ones containing C_PRESET seem to be causing trouble. I have consulted with the author, and he says these lines have in common the fact that they are performing a conversion "char *" (string) -> "int" which should work, but he admits the code is "on the edge" and might have problems on some platforms. The program compiles just fine on my pentium system (gcc 2.6.3) So, does anyone have any ideas how I might get this code to compile? The program is very useful and I would hate to have to give it up. Anyone have any ideas as to what might be "different" about the Alpha version of gcc and thus cause this problem? I would very much appreciate any suggestions which might get me pointed in the right direction. Thanks, Brian E.W. Wood beww@intac.com