<div dir="ltr">Hi,<div><br></div><div>I'm currently trying to run gccxml against a code which has the following defines (pseudo-code)</div><div><br></div><div><pre style="font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51)">
<span>#   if COMPILER IS GCC AND GCC VERSION > 4.3.0</span>
<span>#       define HashMap ::std::tr1::unordered_map</span>
<span>#       define HashSet ::std::tr1::unordered_set</span>
<span>#    else</span>
<span>#       define HashMap ::__gnu_cxx::hash_map</span>
<span>#       define HashSet ::__gnu_cxx::hash_set</span>
<span>#    endif</span></pre><pre style="font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51)"><span><br>
</span></pre><pre style="font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51)"><span>I've read that GCCXML doesn't support </span><span style="line-height:1.4">::std::tr1::unordered_map, but in this case it's not a problem, since there's a fallback to </span><span style="line-height:1.4">::__gnu_cxx::hash_map</span></pre>

<pre style="font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51)"><span style="line-height:1.4">
</span></pre><pre style="font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51)"><span style="line-height:1.4">The issue is that GCCXML fails to parse this header, because the gcc version defined is too high, so it tries to use std::tr1.</span></pre>

<pre style="font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51)"><span style="line-height:1.4">
</span></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#333333" face="'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, monospace"><span style="line-height:1.4">Of course, I can hack this code to force it to use </span></font><span style="color:rgb(51,51,51);font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4">::__gnu_cxx::hash_map, but I'd rather find a cleaner way to do this. </span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(51,51,51);font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(51,51,51);font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Monaco,monospace;font-size:12px;line-height:1.4">Is there a command line switch to force </span><font color="#333333" face="'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, monospace"><span style="line-height:16px">__GNUC__ and </span><span style="line-height:16px">__GNUC_MINOR__ ?</span></font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#333333" face="'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, monospace"><span style="line-height:16px"><br></span></font></pre><pre style="margin-top:0px;margin-bottom:0px">
<font color="#333333" face="'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, monospace"><span style="line-height:16px">Thanks,</span></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#333333" face="'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, monospace"><span style="line-height:16px"><br>
</span></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#333333" face="'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, monospace"><span style="line-height:16px">Mike</span></font></pre>

</div></div>