Opened 8 years ago

Closed 8 years ago

#1609 closed bug (wontfix)

spurious gcc warnings with non-english language setting

Reported by: chris@… Owned by:
Priority: low Milestone:
Component: Compiler Version: 6.6.1
Keywords: Cc: Christian.Maeder@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

In Changeset 13765 the warning about a call-clobbered register was filtered out.

This does not work when using a non-english language setting:

$ echo $LANG de_DE.UTF-8 $ ghc -O -c Test.hs ... /usr/lib64/ghc-6.6.1/include/Regs.h:220:0:

Warnung: für Ruf vorgesehenes Register wurde für globale Registervariable verwendet

...

Attachments (2)

log (3.6 KB) - added by Christian.Maeder@… 8 years ago.
ghc-6.6.1 output
ghc.log (5.0 KB) - added by chris@… 8 years ago.
log from ghc -v -O -c Test.hs

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by chris@…

Sorry about the formatting. Same thing with line breaks:

$ echo $LANG
de_DE.UTF-8
$ ghc -O -c Test.hs
...
/usr/lib64/ghc-6.6.1/include/Regs.h:220:0:
            Warnung: für Ruf vorgesehenes Register wurde für globale Registervariable verwendet
...

comment:2 Changed 8 years ago by Christian.Maeder@…

How's the message when you set?

export LC_ALL=C

Maybe attach your file Test.hs. (I also don't know where to find the Changeset 13765)

comment:3 Changed 8 years ago by chris@…

> How's the message when you set?
>
> export LC_ALL=C

no warning is produced.

Maybe attach your file Test.hs.

Any program will produce the warnings, for example

main = putStr "Hello, World!\n"

(I also don't know where to find the Changeset 13765)

http://hackage.haskell.org/trac/ghc/changeset/13765

As I understand the situation, the patch was to filter out a warning message that occurs for -O compiled ghc code in x64, which could not be disabled via a gcc flag. Obviously, grepping for the english message text (if that's what the patch does) will not suppress the german message I get

The real fix for this would be to get the gcc developers to add a flag to disable this warning.

Changed 8 years ago by Christian.Maeder@…

ghc-6.6.1 output

comment:4 Changed 8 years ago by Christian.Maeder@…

  • Cc Christian.Maeder@… added

I cannot reproduce your case. It works for me with the same LANG set. Maybe it can be explained by my gcc version (or maybe gcc was build differently). I've attached my output of:

ghc -v -O -c Test.hs

Does your warning prevent further compilation? An other workaround would be to reset LANG just for the gcc call.

Changed 8 years ago by chris@…

log from ghc -v -O -c Test.hs

comment:5 Changed 8 years ago by chris@…

Your gcc seems to emit english messages. I've attached a log of my ghc invocation.

The warning does not have further consequences - the programs compile and run normally. The problem is entirely harmless - just very irritating.

Feel free to adjust the Priority and Severity downwards.

comment:6 Changed 8 years ago by igloo

  • Resolution set to wontfix
  • Status changed from new to closed

If we set LANG or LC_ALL then you would also get real warnings and errors in English, rather than your preferred language.

From 6.8.1, -O will no longer imply -fvia-C, so gcc won't be used and you won't get this warning.

Note: See TracTickets for help on using tickets.