[LLVMbugs] [Bug 17412] New: Error could be more helpful

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 30 02:43:45 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17412

            Bug ID: 17412
           Summary: Error could be more helpful
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gmisocpp at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11302
  --> http://llvm.org/bugs/attachment.cgi?id=11302&action=edit
cpp file mentioned to be compiled as mentioned in the details.

Compile the attached file (as shown below) with clang++ and g++ and then
compare the output. The output from my machine is shown below:
(More of my notes follow this output)

c:\test>clang++ -std=c++11 moslow.cpp -I/libcxx/include -L/libcxx_build/lib
-oz.exe
moslow.cpp:49:16: error: use of undeclared identifier 'storage_get'
        return storage_get();
               ^
1 error generated.

c:\test>g++ -std=c++11 moslow.cpp -I/libcxx/include -L/libcxx_build/lib -oz.exe
moslow.cpp: In member function 'T& manually_constructed_object<T,
S>::uninitialized_get()':
moslow.cpp:49:28: error: there are no arguments to 'storage_get' that depend on
a template parameter, so a declaration o
'storage_get' must be available [-fpermissive]
         return storage_get();
                            ^
moslow.cpp:49:28: note: (if you use '-fpermissive', G++ will accept your code,
but allowing the use of an undeclared nam
is deprecated)

Note how g++ is more descriptive in explaining exactly why there is an error.
It would be nice if clang++ could match this. If there is a permissive option
in clang++ that would allow it to compile (I tried permissive but it didn't
work for clang++ bug did for g++), then the clang++ error should also mention
whatever that option is.

I got this error using Windows, but I doubt the platform is relevant.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130930/e02a9aeb/attachment.html>


More information about the llvm-bugs mailing list