Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!eru!hagbard!sunic!mcsun!inria!irisa!ridoux From: ridoux@irisa.fr (Olivier Ridoux) Newsgroups: comp.lang.c Subject: &&** Message-ID: <1990Sep6.091605.15732@irisa.fr> Date: 6 Sep 90 09:16:05 GMT Sender: news@irisa.fr Organization: IRISA, Rennes (Fr) Lines: 23 Hello, I'd like to know about the portability of expressions of the form `` &^n*^n x '' (`` &*x '', `` &&**x '', `` &&&***x '', ...). An expression of the form `` &&x '' seems to make no sense, since `` & '' requires a lvalue though it yields no lvalue. So `` &&**x '' seems to be ruled out. However, `` &*x '' and `` x '' have the same value though `` x '' may be a lvalue and `` &*x '' cannot if `` & '' is interpreted conservatively. So expressions of the form `` &^n*^n x '' can be reduced to `` x '' through algebraic manipulation. One can even consider that `` &^n*^n x '' has the lvalue-ness of `` x '' (in contrast with the conservative interpretation of `` & ''). The gcc compiler performs this algebraic simplification. My question is: can a programmer expect that every C compiler will perform the algebraic simplification of `` &^n*^nx '' to `` x '', and what will be the lvalue-ness of the expression ? I thank you in advance, Olivier Ridoux