This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/12841] New: mqueue2.h: declaration of âmqd_t mq_open(const char*, int, ...)â throws different exceptions


http://sourceware.org/bugzilla/show_bug.cgi?id=12841

           Summary: mqueue2.h: declaration of âmqd_t mq_open(const char*,
                    int, ...)â throws different exceptions
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: aurelien@aurel32.net


Created attachment 5765
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5765
Patch to fix the issue

Given the following code:

#include <mqueue.h>
int main()
{
        mq_open("/tmp/test", O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR, 0);
        return 0;
}

When it is compiled with, "g++ -O -pedantic -D_FORTIFY_SOURCE=1", it fails with
the following error:

/usr/include/bits/mqueue2.h: In function âmqd_t mq_open(const char*, int,
...)â:
/usr/include/bits/mqueue2.h:37: error: declaration of âmqd_t mq_open(const
char*, int, ...)â throws different exceptions
/usr/include/bits/mqueue2.h:26: error: from previous declaration âmqd_t
mq_open(const char*, int, ...) throw ()â

As gcc said, it's due to two different declarations in bits/mqueue2.h. The
attached patch fixes the issue.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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