public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50917] New: [4.7 Regression] Mozilla build fails because of C++11 user-defined literals
@ 2011-10-30  8:15 markus at trippelsdorf dot de
  2011-10-30  9:10 ` [Bug c++/50917] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-30  8:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50917

             Bug #: 50917
           Summary: [4.7 Regression] Mozilla build fails because of C++11
                    user-defined literals
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: markus@trippelsdorf.de


Mozilla fails to build because of the recently merged C++11 user-defined
literals implementation:
c++ -o nsGlueLinkingDlopen.i_o -c -I../../../dist/system_wrappers -include
/var/tmp/mozilla-central/config/gcc_hidden.h -DOSTYPE=\"Linux3.1\"
-DOSARCH=Linux -DXPCOM_GLUE -DTARGET_XPCOM_ABI=\"x86_64-gcc3\"
-I/var/tmp/mozilla-central/xpcom/glue/standalone/../../build
-I/var/tmp/mozilla-central/xpcom/glue/standalone -I. -I../../../dist/include
-I../../../dist/include/nsprpub -I/usr/include/nspr -I/usr/include/nss -fPIC
-fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -march=native
-ffunction-sections -fdata-sections -fvisibility-inlines-hidden -fpermissive
-Wno-delete-non-virtual-dtor -fno-exceptions -fno-strict-aliasing -std=gnu++0x
-pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED
-fprofile-generate -O3 -fomit-frame-pointer -DMOZILLA_CLIENT -include
../../../mozilla-config.h -MD -MF .deps/nsGlueLinkingDlopen.pp
/var/tmp/mozilla-central/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp

/var/tmp/mozilla-central/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp: In
function ‘nsresult XPCOMGlueLoad(const char*, nsresult (**)(XPCOMFunctions*,
const char*))’:
/var/tmp/mozilla-central/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp:231:68:
error: unable to find user-defined string literal operator ‘operator""
MOZ_DLL_SUFFIX’

xpcom/glue/standalone/nsGlueLinkingDlopen.cpp:231:
snprintf(lastSlash, MAXPATHLEN - strlen(xpcomDir), "/" XUL_DLL);

./moz-build-dir/mozilla-config.h
#define MOZ_DLL_SUFFIX ".so"

./xpcom/build/nsXPCOMPrivate.h:
#define XUL_DLL   "libxul"MOZ_DLL_SUFFIX

Please note that they're using -std=gnu++0x


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/50917] [4.7 Regression] Mozilla build fails because of C++11 user-defined literals
  2011-10-30  8:15 [Bug c++/50917] New: [4.7 Regression] Mozilla build fails because of C++11 user-defined literals markus at trippelsdorf dot de
@ 2011-10-30  9:10 ` rguenth at gcc dot gnu.org
  2011-10-30  9:29 ` markus at trippelsdorf dot de
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-30  9:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50917

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
   Target Milestone|---                         |4.7.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/50917] [4.7 Regression] Mozilla build fails because of C++11 user-defined literals
  2011-10-30  8:15 [Bug c++/50917] New: [4.7 Regression] Mozilla build fails because of C++11 user-defined literals markus at trippelsdorf dot de
  2011-10-30  9:10 ` [Bug c++/50917] " rguenth at gcc dot gnu.org
@ 2011-10-30  9:29 ` markus at trippelsdorf dot de
  2011-10-30 10:21 ` markus at trippelsdorf dot de
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-30  9:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50917

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |

--- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-30 09:28:51 UTC ---
IOW:

 % cat test.cpp
#include <cstdio>
#define MOZ_DLL_SUFFIX ".so"
int main () {
  char lastSlash[4096];
  snprintf(lastSlash, 4096 , "/" "libxul"MOZ_DLL_SUFFIX);
}

 % g++ test.cpp -std=gnu++0x
test.cpp: In function ‘int main()’:
test.cpp:5:34: error: unable to find user-defined string literal operator
‘operator"" MOZ_DLL_SUFFIX’


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/50917] [4.7 Regression] Mozilla build fails because of C++11 user-defined literals
  2011-10-30  8:15 [Bug c++/50917] New: [4.7 Regression] Mozilla build fails because of C++11 user-defined literals markus at trippelsdorf dot de
  2011-10-30  9:10 ` [Bug c++/50917] " rguenth at gcc dot gnu.org
  2011-10-30  9:29 ` markus at trippelsdorf dot de
@ 2011-10-30 10:21 ` markus at trippelsdorf dot de
  2011-10-30 12:23 ` markus at trippelsdorf dot de
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-30 10:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50917

--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-30 10:20:42 UTC ---
Another example (happened later in Mozilla build, after putting
a space between "libxul"MOZ_DLL_SUFFIX):

struct  SECMODModule *nssMod = SECMOD_CreateModule(__null,
"NSS Internal PKCS #11 Module", __null,
"Flags=internal,critical"fips" slotparams=(""1""={"SECMOD_SLOT_FLAGS"})");

 % c++ -std=gnu++0x test.ii
test.ii:3:48: error: inconsistent user-defined literal suffixes ‘fips’ and
‘SECMOD_SLOT_FLAGS’ in string literal
test.ii:3:69: error: unable to find user-defined string literal operator
‘operator"" fips’
test.ii:3:73: error: ‘SECMOD_CreateModule’ was not declared in this scope


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/50917] [4.7 Regression] Mozilla build fails because of C++11 user-defined literals
  2011-10-30  8:15 [Bug c++/50917] New: [4.7 Regression] Mozilla build fails because of C++11 user-defined literals markus at trippelsdorf dot de
                   ` (2 preceding siblings ...)
  2011-10-30 10:21 ` markus at trippelsdorf dot de
@ 2011-10-30 12:23 ` markus at trippelsdorf dot de
  2011-10-31 19:39 ` markus at trippelsdorf dot de
  2011-11-23 13:23 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-30 12:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50917

--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-30 12:22:30 UTC ---
The problem in comment 2 is fixed by:

replacing:
#define SECMOD_MAKE_NSS_FLAGS(fips,slot) \
"Flags=internal,critical"fips" slotparams=("#slot"={"SECMOD_SLOT_FLAGS"})"
with:
#define SECMOD_MAKE_NSS_FLAGS(fips,slot) \                                      
"Flags=internal,critical" fips" slotparams=("#slot"={" SECMOD_SLOT_FLAGS"})"

in nss/secmodt.h

So I guess this bug is invalid, because the compiler is right to 
issue an error according to the new standard (2.14.8).


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/50917] [4.7 Regression] Mozilla build fails because of C++11 user-defined literals
  2011-10-30  8:15 [Bug c++/50917] New: [4.7 Regression] Mozilla build fails because of C++11 user-defined literals markus at trippelsdorf dot de
                   ` (3 preceding siblings ...)
  2011-10-30 12:23 ` markus at trippelsdorf dot de
@ 2011-10-31 19:39 ` markus at trippelsdorf dot de
  2011-11-23 13:23 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-31 19:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50917

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-31 19:39:08 UTC ---
The experts have spoken:
https://groups.google.com/forum/#!topic/comp.std.c++/9nD4Mb8pN1Q


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/50917] [4.7 Regression] Mozilla build fails because of C++11 user-defined literals
  2011-10-30  8:15 [Bug c++/50917] New: [4.7 Regression] Mozilla build fails because of C++11 user-defined literals markus at trippelsdorf dot de
                   ` (4 preceding siblings ...)
  2011-10-31 19:39 ` markus at trippelsdorf dot de
@ 2011-11-23 13:23 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-23 13:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50917

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mutz at kde dot org

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-23 13:10:19 UTC ---
*** Bug 51282 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-23 13:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-30  8:15 [Bug c++/50917] New: [4.7 Regression] Mozilla build fails because of C++11 user-defined literals markus at trippelsdorf dot de
2011-10-30  9:10 ` [Bug c++/50917] " rguenth at gcc dot gnu.org
2011-10-30  9:29 ` markus at trippelsdorf dot de
2011-10-30 10:21 ` markus at trippelsdorf dot de
2011-10-30 12:23 ` markus at trippelsdorf dot de
2011-10-31 19:39 ` markus at trippelsdorf dot de
2011-11-23 13:23 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).