This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/41692] New: -fno-leading-underscore ignored

That sums it up really. On Linux everything is fine, but on Windows this flag
is ignored. To reproduce, just compile void foo() {} with and without the flag,
nm the resulting obj and see that the underscore is always there.

This is a problem for me because I'm mixing nasm and c and hoping to build on
both linux and windows. The linux version doesn't use leading underscores
anyway, but the windows version does. Why? Why don't they behave the same and
save all the hassle? I could tell my nasm code to import symbols with
underscores, but then the linux version would break. I tried telling the linux
version to use the underscores, but the linker still expected none and couldn't
link between c files. The linker wouldn't be told to expect underscores unless
it was making a shared library. This is all just obscuring the code and I see
no reason for the difference. Even if the difference is justified, at the very
least -fno-leading-underscores should work.

I don't really have the option of using a different gcc version because I just
let the cygwin installer decide that and I don't want to break it. Besides, my
customers wouldn't want that adventure either. So it looks like I'm stuffed all

           Summary: -fno-leading-underscore ignored
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: adrian dot alexander dot may at gmail dot com
 GCC build triplet: Cygwin
  GCC host triplet: Cygwin
GCC target triplet: Cygwin

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]