[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#530949: gcc-4.4: warns about idiomatic use of Berkeley sockets



On Sat, May 30, 2009 at 12:15:17AM +0100, Philip Martin wrote:
> The definition of c99 from your earlier POSIX reference
> 
> http://www.opengroup.org/onlinepubs/000095399/utilities/c99.html
> 
> states that the compiler should accept code conforming to the ISO C
> standard.  The code you are trying to compile doesn't conform.

POSIX (and XSI) specify certain extensions.  For example, (a draft
of[0]) the C standard states:

  All identifiers that begin with an underscore and either an uppercase
  letter or another underscore are always reserved for any use.

Yet POSIX states:

  A POSIX-conforming application should ensure that the feature test
  macro _POSIX_C_SOURCE is defined before inclusion of any header.

According to ISO C, that POSIX-mandated behavior is not allowed.
dlsym(3) contains another example in its Rationale section, except for
XSI instead of all POSIX systems.

[0] I don't really care to purchase the actual standard, but it's
probably nearly identical.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


Reply to: