delorie.com/archives/browse.cgi | search |
From: | Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> |
Newsgroups: | comp.os.msdos.djgpp,comp.lang.c |
Subject: | Re: Warning : if (x=y) |
Organization: | Pin Eight Software http://pineight.8m.com/ |
Message-ID: | <rcmtrs40e806pup3jeumlfujp2s31k81kb@4ax.com> |
References: | <afelrschg9sb1dd01iktt3jnnivl6o86jn AT 4ax DOT com> <Pine DOT A41 DOT 4 DOT 05 DOT 10009110957500 DOT 41154-100000 AT ieva06 DOT lanet DOT lv> <m1etrskc3a85j5h64lhp5hptr5t853vapj AT 4ax DOT com> |
X-Newsreader: | Forte Agent 1.7/32.534 |
MIME-Version: | 1.0 |
Lines: | 35 |
X-Trace: | /bNDCymmm6IagdvsanMadMaQV3u9jqAwaT/m7uGLI7hKkvu3zdbvcTveBXaAMrR4MOlKcHXZT00e!kqvJ+38weCRTXBew+7fCRjffw3g92T4rqvNOC0iSJET5FPWaZig4ZlzAyCn2bX7NcVhCSLPh87q/!f9n+9e0= |
X-Complaints-To: | abuse AT gte DOT net |
X-Abuse-Info: | Please be sure to forward a copy of ALL headers |
X-Abuse-Info: | Otherwise we will be unable to process your complaint properly |
NNTP-Posting-Date: | Wed, 13 Sep 2000 01:36:48 GMT |
Distribution: | world |
Date: | Wed, 13 Sep 2000 01:36:48 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
On Wed, 13 Sep 2000 00:48:21 +0100, Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk> wrote: >Andris Pavenis <pavenis AT lanet DOT lv> wrote: > >> With gcc-2.95.2 -fpedantic-errors is default for C++ ... > >Unless you compile the following as C++ code: > >int main(void) >{ > char s1[4], s2[4] = "foo"; > > s1 = s2; /* illegal */ > > return 0; >} > >I don't know if this is bug or feature [in GCC]. Feature. AFAIK an array name is not an lvalue. You can, OTOH, say char *s1; char *s2[4] = "bar"; s1 = s2; comp.lang.c added for a full explanation of this language issue. -- MS (n) 1. A debilitating and surprisingly widespread affliction that renders the sufferer barely able to perform the simplest task. 2. A disease, multiple sclerosis (see). This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |