From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,ad5e4b9fa343d309,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-09-08 01:59:29 PST Newsgroups: comp.sys.dec Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!cs.utexas.edu!uunet!Germany.EU.net!news.dfn.de!news.belwue.de!fht-mannheim!roxi.rz.fht-mannheim.de!duz From: duz@roxi.rz.fht-mannheim.de (Dirk Zoller) Subject: longvar << (long)1 ?? Sender: news@roxi.rz.fht-mannheim.de (NEWS - system account) Organization: Fachhochschule fuer Technik, Mannheim (FRG) Date: Thu, 08 Sep 94 08:34:52 CET X-Newsreader: TIN [version 1.2 PL2] Message-ID: <1994Sep8.083452.3086@roxi.rz.fht-mannheim.de> Hello, Porting one of my programs to an DEC alpha platform a fellow on the net scattered several type casts in the code which I don't quite understand. He uses GNU-C. There are long-variables (64 Bit integers) to be shifted. He casts the shift-count to long too. Like this: long l; ... l <<= (long)1; Is this neccessary? If so: Isn't that a bug in the compiler? I don't read this usegroup normally, so please mail a response. Thank you. Dirk --- duz@roxi.rz.fht-mannheim.de "Software is neither science nor engineering. It's really an obscure form of poetry."