<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 20, 2016, 21:07 Justin Bogner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Joerg Sonnenberger via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
> On Mon, Jun 20, 2016 at 05:05:18PM +0000, Paweł Bylica via llvm-dev wrote:<br>
>> On Sun, Jun 19, 2016, 17:57 Joerg Sonnenberger <<a href="mailto:joerg@bec.de" target="_blank">joerg@bec.de</a>> wrote:<br>
>><br>
>> > On Sun, Jun 19, 2016 at 03:24:22PM +0000, Paweł Bylica via llvm-dev wrote:<br>
>> > > Hi LLVM,<br>
>> > ><br>
>> > > I want to complain a bit about the quality of the code included in the<br>
>> > > public LLVM headers. For projects that depend on LLVM is really hard to<br>
>> > > just include LLVM headers not to trigger tons of warnings.<br>
>> > ><br>
>> > > Moreover, the is this issue that you have to define __STDC_LIMIT_MACROS<br>
>> > and<br>
>> > > __STDC_CONSTANT_MACROS everywhere just to include single DataTypes.h.<br>
>> > > Strangely, it seems to be required only when compiling with clang, not<br>
>> > with<br>
>> > > GCC.<br>
>> > ><br>
>> > > Can we do anything to improve the situation?<br>
>> > ><br>
>> > > I have just one idea, to add unittests that only include public headers<br>
>> > > with higher compiler restrictions than for LLVM code in .cpp files.<br>
>> ><br>
>> > Get a system with C++11 compliant system headers.<br>
>> ><br>
>><br>
>> What do you mean exactly? How is this related?<br>
><br>
> __STDC_LIMIT_MACROS and co are requirements by C99 superseded by C++11.<br>
> If your system headers correctly implement C++11, you don't need them.<br>
<br>
Apparently DataTypes.h does the following:<br>
<br>
  #if !defined(__STDC_LIMIT_MACROS)<br>
  # error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"<br>
  #endif<br>
<br>
I'm guessing this is what Paweł is talking about. Maybe this is an<br>
obsolete check from before we required a C++11 compliant host compiler?<br></blockquote></div><div><br></div><div>Exactly. This is required to have macros like ULONG_MAX available in DataTypes.h. I wander if that requirement can be replaced with something less intrusive for projects depending on LLVM.</div><div><br></div><div>I can work on changes, but need at least a clue that has a chance to be accepted.</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>