www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/06/08/06:21:57

Sender: michon AT email DOT enst DOT fr
To: pgcc AT delorie DOT com
Subject: trouble compiling dhcpcd-1.3.7
MIME-Version: 1.0
From: Emmanuel Michon <emmanuel DOT michon AT polytechnique DOT org>
Date: 08 Jun 1999 12:16:41 +0200
Message-ID: <j2ln1ybngja.fsf@rocher.enst.fr>
Lines: 64
User-Agent: Gnus/5.07008 (Pterodactyl Gnus v0.80) Emacs/20.3
Reply-To: pgcc AT delorie DOT com

--=-=-=

Hi,

pgcc-1.1.3-3mdk, the defaut C compiler of the Mandrake 6.0 (Venus)
Linux distribution (with 2.2.5 kernel), is not able to compile dhcpcd-1.3.7,
certainly because of a bug in preprocessor optimization.

gcc -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -Wall  -I. -c client.c
client.c: In function `parseDhcpMsgRecv':
client.c:88: warning: suggest explicit braces to avoid ambiguous `else'

produces a client.o

and

gcc -O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -Wall  -I. -c client.c
client.c: In function `parseDhcpMsgRecv':
client.c:88: warning: suggest explicit braces to avoid ambiguous `else'
client.c:280: invalid operands to binary &
client.c:280: invalid operands to binary &
client.c:280: invalid operands to binary &
client.c:280: invalid operands to binary &
client.c:288: invalid operands to binary &
client.c:288: invalid operands to binary &
client.c:288: invalid operands to binary &
client.c:288: invalid operands to binary &

now, let's gcc -E -O2 client.c >client.c-expanded, the trouble is here:

line 280 of client.c

*(unsigned int *)DhcpOptions.val[dhcpT1value] = htonl(0.5*ntohl(*(unsigned int *)DhcpOptions.val[dhcpIPaddrLeaseTime]));

is expanded into:


--=-=-=
Content-Type: application/octet-stream;
 name=enormousline.gz
Content-Disposition: attachment;
 filename=enormousline.gz
Content-Description: the line 280 expanded by gcc -E -O2
Content-Transfer-Encoding: base64

H4sICCftXDcCA2Vub3Jtb3VzbGluZQDtl89LwzAUx8/1r/hSUJoeRvAHiN128iIIethNJGRr
OgNdWpq0DtT/3ZfuNGQoWlkPeaektB/ee9/PpYCvNGmN1WujcmjjkLLbl1X9UDtdGTvpZPmU
031xQadWPWOGRAi1dYq+qYwQUfKGRq21darBHkiILot04d9ftrp02ogVIZ00TtRIAD65Soej
/WiMu0eZ5829klYt9IbGAWMRof1YVPg1Bgxn4Nui4H0xzOc4v2R4xxBYznfgHotrwkbDYHdg
hul0h8VQWA/usbQEhixSpVW0aGk3Qvgsq1I6XSq6JPHSvsoapzyObhDPmthn3DF/4XTea4X9
KWmW+awzfFBL+Bp98DH4eEwfv8ss+Bn8HIGfB5cb/Ax+jsLPA1sIfgY/R+Lnf7YbNA+aH/e3
au9BdvIJcx3tomcQAAA=

--=-=-=


hope you get something useful out of this...

-- 
Emmanuel Michon (http://www.stud.enst.fr/~michon)


--=-=-=--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019