From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 19 Aug 2009 12:27:44 +0400 From: Sergey Vlasov To: sisyphus@lists.altlinux.org Message-ID: <20090819082744.GA8548@atlas.home> Mail-Followup-To: sisyphus@lists.altlinux.org References: <4A7BE270.2050705@diyaorg.dp.ua> <4A7BED90.1090607@diyaorg.dp.ua> <1249636677.24188.15.camel@latitude.localdomain> <8b9c685c0908130744w285dbabdp144b963caa795007@mail.gmail.com> <8b9c685c0908170825p1ffd3287y60f5fc4c4e9386d7@mail.gmail.com> <20090819004107.GB12237@wo.int.altlinux.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <20090819004107.GB12237@wo.int.altlinux.org> Subject: Re: [sisyphus] liblensfun vs g++ X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Sisyphus discussions List-Id: ALT Linux Sisyphus discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2009 08:27:46 -0000 Archived-At: List-Archive: List-Post: --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 19, 2009 at 04:41:07AM +0400, Dmitry V. Levin wrote: > =F0=CF=D7=C5=C4=C5=CE=C9=C5 g++ =C9=DA=CD=C5=CE=C9=CC=CF=D3=D8 =CD=C5=D6= =C4=D5 4.3 =C9 4.4; =C5=D3=CC=C9 =DC=D4=CF =CE=C5 regression, =D4=CF, =D7= =C9=C4=C9=CD=CF, > =CE=C1=C4=CF =D0=C1=D4=DE=C9=D4=D8 liblensfun (=D3=CD. =D0=C1=D4=DE). Testcase =D0=CF=D0=D2=CF=DD=C5: ----------------------------------------------------------------------- #include enum TestEnum { TEST_0, TEST_1 }; #ifndef __cplusplus typedef enum TestEnum TestEnum; #endif #ifdef __cplusplus extern "C" #endif void print_value(TestEnum x) { switch (x) { case TEST_0: printf("TEST_0\n"); return; case TEST_1: printf("TEST_1\n"); return; } printf("BAD\n"); } int main(int argc, char *argv[]) { (void)argc; (void)argv; print_value(TEST_0); print_value(TEST_1); print_value((TestEnum)2); return 0; } ----------------------------------------------------------------------- =F0=D2=C9 =CB=CF=CD=D0=C9=CC=D1=C3=C9=C9 =DC=D4=CF=C7=CF =CB=CF=C4=C1 =CB= =C1=CB C =CF=CE =D2=C1=C2=CF=D4=C1=C5=D4 =CF=D6=C9=C4=C1=C5=CD=D9=CD =CF=C2= =D2=C1=DA=CF=CD: $ gcc -g -O2 -Wall -W -o enum_test enum_test.c =20 $ ./enum_test =20 TEST_0 TEST_1 BAD =E1 =D7=CF=D4 =D0=D2=C9 =CB=CF=CD=D0=C9=CC=D1=C3=C9=C9 =CB=C1=CB C++ =D0=D2= =CF=C9=D3=C8=CF=C4=C9=D4 =D3=D4=D2=C1=CE=CE=CF=C5: $ g++ -g -O2 -Wall -W -o enum_test enum_test.c =20 $ ./enum_test =20 TEST_0 TEST_1 TEST_0 (=C9 =C4=C1=D6=C5 =D3 -O0 =DC=D4=CF=D4 =D2=C5=DA=D5=CC=D8=D4=C1=D4 =CE=C5 = =CD=C5=CE=D1=C5=D4=D3=D1). =E6=CF=D2=CD=C1=CC=D8=CE=CF =D3=D4=C1=CE=C4=C1=D2=D4=CF=CD C++98 =D0=CF=C4= =CF=C2=CE=CF=C5 =D0=CF=D7=C5=C4=C5=CE=C9=C5 =CE=C5 =DA=C1=D0=D2=C5=DD=C5=CE= =CF - =D2=C5=DA=D5=CC=D8=D4=C1=D4 =D0=D2=C5=CF=C2=D2=C1=DA=CF=D7=C1=CE=C9=D1 =C3=C5=CC=CF=DE=C9=D3=CC=C5=CE= =CE=CF=C7=CF =DA=CE=C1=DE=C5=CE=C9=D1 =D7 enum-=D4=C9=D0 =CE=C5 =CF=D0=D2= =C5=C4=C5=CC=A3=CE =D7 =D3=CC=D5=DE=C1=C5, =CB=CF=C7=C4=C1 =DA=CE=C1=DE=C5=CE=C9=C5 =CE=C5 =D7=C8= =CF=C4=C9=D4 =D7 =C4=C9=C1=D0=C1=DA=CF=CE =DA=CE=C1=DE=C5=CE=C9=CA =DC=D4= =CF=C7=CF enum: 5.2.9/7: A value of integral type can be explicitly converted to an enumeration type. The value is unchanged if the integral value is within the range of the enumeration values (7.2). Otherwise, the resulting enumeration value is unspecified. (=D0=D2=C9=DE=A3=CD =C4=CC=D1 "unspecified behavior" =CE=C5 =CF=C2=D1=DA=C1= =D4=C5=CC=D8=CE=CF =C4=C1=D6=C5 =C4=CF=CB=D5=CD=C5=CE=D4=C9=D2=CF=D7=C1=D4= =D8 =D0=CF=D7=C5=C4=C5=CE=C9=C5 =D7 =D4=C1=CB=C9=C8 =D3=CC=D5=DE=C1=D1=C8). =F3 =D4=CF=DE=CB=C9 =DA=D2=C5=CE=C9=D1 C++98 =CF=DB=C9=C2=CF=DE=CE=D9=CA = =CB=CF=C4 =D7 =C4=C1=CE=CE=CF=CD =D3=CC=D5=DE=C1=C5 - (TestEnum)2; =D7 =CB=CF=CD=C2=C9=CE=C1=C3=C9=C9 ufraw+liblensfun =D3=C9=D4=D5=C1=C3=C9= =D1 =D5=D3=D5=C7=D5=C2=CC=D1=C5=D4=D3=D1 =D4=C5=CD, =DE=D4=CF =D0=D2=C5=CF=C2=D2=C1=DA=CF=D7=C1=CE=C9=C5 =D7 enum =D7=D9=D0=CF=CC=CE=D1= =C5=D4=D3=D1 =D7 =CB=CF=C4=C5 =CE=C1 C, =C4=CC=D1 =CB=CF=D4=CF=D2=CF=C7=CF = enum =D0=D2=C1=CB=D4=C9=DE=C5=D3=CB=C9 =CE=C5 =CF=D4=CC=C9=DE=C1=C5=D4=D3=D1 =CF= =D4 =C3=C5=CC=CF=DE=C9=D3=CC=C5=CE=CE=CF=C7=CF =D4=C9=D0=C1. =FE=D4=CF =C9=CE=D4=C5=D2=C5=D3=CE=CF - =D4=C1=CB=CF=C5 =D0=CF=D7=C5=C4=C5= =CE=C9=C5 =CB=CF=CD=D0=C9=CC=D1=D4=CF=D2=C1 =CE=C1=C2=CC=C0=C4=C1=C5=D4=D3= =D1 =D4=CF=CC=D8=CB=CF =C4=CC=D1 enum =D3 =C4=D7=D5=CD=D1 =CB=CF=CE=D3=D4=C1=CE=D4=C1=CD=C9; =D0=D2=C9 =C4= =CF=C2=C1=D7=CC=C5=CE=C9=C9 =D4=D2=C5=D4=D8=C5=CA =CB=CF=CE=D3=D4=C1=CE=D4= =D9 =D0=D2=CF=D7=C5=D2=CB=C9 =CE=C1 =CE=C5=C4=CF=D0=D5=D3=D4=C9=CD=CF=C5 =C4=CC=D1 enum =DA=CE=C1=DE=C5=CE=C9= =C5 =CE=C5 =C9=D3=DE=C5=DA=C1=C0=D4. --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqLt4AACgkQW82GfkQfsqI4ugCeKeQds+hMY6F/LwBzKjbbIlOF dPQAnRKf47+q2ae7KJGCCB5nh1QZeDLp =ff8G -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI--