<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Error could be more helpful"
href="http://llvm.org/bugs/show_bug.cgi?id=17412">17412</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Error could be more helpful
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gmisocpp@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11302" name="attach_11302" title="cpp file mentioned to be compiled as mentioned in the details.">attachment 11302</a> <a href="attachment.cgi?id=11302&action=edit" title="cpp file mentioned to be compiled as mentioned in the details.">[details]</a></span>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>