Ticket #3389 (closed feature request: wontfix)
CPP strips out C-style comments
| Reported by: | nominolo | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.1 |
| Component: | Driver | Version: | 6.10.2 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | T3389 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
The following code fails to compiler with `y` not in scope:
{-# LANGUAGE CPP #-}
module Foo (x) where
x = ([y], z)
-- Oh, noes! Here comes a C-style comment: /usr/local/*
y = 42
-- And now let's close it */Setup.hs accidentally
z = 23
Apparently, the part between the /* and the */ got stripped out by the preprocessor. If we use a gcc's CPP mode, we should at least pass it some options to prevent this from happening.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

