Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WLbVa-0007sc-Id for pgsql-odbc@arkaria.postgresql.org; Thu, 06 Mar 2014 16:50:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WLbVZ-0004d2-RY for pgsql-odbc@arkaria.postgresql.org; Thu, 06 Mar 2014 16:50:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WLbVZ-0004cw-CB for pgsql-odbc@postgresql.org; Thu, 06 Mar 2014 16:50:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WLbVV-0005Rs-Uh for pgsql-odbc@postgresql.org; Thu, 06 Mar 2014 16:50:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s26Gopms027048; Thu, 6 Mar 2014 11:50:52 -0500 From: Tom Lane To: Heikki Linnakangas cc: Michael Paquier , PostgreSQL mailing lists Subject: Re: Elimination of (more or less) all compilation warnings on OSX In-reply-to: <53189C96.1050609@vmware.com> References: <53187E62.4080907@vmware.com> <53189C96.1050609@vmware.com> Comments: In-reply-to Heikki Linnakangas message dated "Thu, 06 Mar 2014 18:04:38 +0200" Date: Thu, 06 Mar 2014 11:50:51 -0500 Message-ID: <27047.1394124651@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org Heikki Linnakangas writes: > It's worth noting that isspace, isdigit etc. take an "unsigned char" > argument. The compiler won't warn if you pass a "char", so you have to > be careful with that. In practice, I don't think it will lead to actual > bugs on any real platform and locale, but still.. It definitely used to lead to bugs on some old platforms. It may be that everybody is more careful nowadays, but the POSIX spec is still perfectly clear about it: The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined. I had my old HPUX box hacked up so that gcc would produce "subscript is a char" warnings for unsafe usage. It seems a bit more difficult to get modern platforms to do that, though; people stopped exposing the underlying flag array in the system headers ... regards, tom lane -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc