[GHC] #3844: Undeprecate #include (in at least some circumstances)
GHC
trac at galois.com
Thu Jan 28 02:27:13 EST 2010
#3844: Undeprecate #include (in at least some circumstances)
-------------------------------+--------------------------------------------
Reporter: cjs | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (FFI)
Version: 6.12.1 | Keywords: #include deprecation
Os: Linux | Testcase:
Architecture: x86_64 (amd64) | Failure: Incorrect warning at compile-time
-------------------------------+--------------------------------------------
The attached program generates a warning: "Warning: -#include is
deprecated: No longer has any effect". However, if I remove the #include,
it fails to compile with:
{{{
Fixes.hsc: In function ‘main’:
Fixes.hsc:29: error: ‘SOL_SOCKET’ undeclared (first use in this function)
Fixes.hsc:29: error: (Each undeclared identifier is reported only once
Fixes.hsc:29: error: for each function it appears in.)
Fixes.hsc:29: error: ‘SO_LINGER’ undeclared (first use in this function)
Fixes.hsc:37: error: invalid application of ‘sizeof’ to incomplete type
‘struct linger’
Fixes.hsc:40: error: invalid use of undefined type ‘struct linger’
Fixes.hsc:41: error: invalid use of undefined type ‘struct linger’
}}}
Evidently it's not quite true that #include no longer has any effect.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3844>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list