Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange behavior for X.cpp/X.hpp files in Integrity
    primarykey
    data
    text
    <p>I'm having a project which compiles perfectly with <code>gcc</code>, but fails to compile under Greenhills Integrity environment.</p> <p>The problem boils down to this three files:</p> <pre><code>MyVector.cpp // contains function testVector MyVector.hpp // contains template vector&lt;&gt; SomeFile.cpp </code></pre> <p><code>MyVector.hpp</code> contains template-class for a vector, and <code>MyVector.cpp</code> contains a testing function unrelated to <code>MyVector.hpp</code>'s templates.</p> <p>Now, when I'm using <code>MyVector.hpp</code>'s <code>vector</code> templates in <code>SomeFile.cpp</code>, somehow, the function <code>testVector</code> gets injected into <code>SomeFile.cpp</code>. When I cease to use <code>vector</code> in <code>SomeFile.cpp</code> (I'm still <code>#include</code>'ing it of course, I'm just not instantiate the template there) it works perfectly.</p> <p>Moreover when I injected a warning into function <code>testVector</code>, the compiler showed the warning <strong>when I compiled <code>SomeFile.cpp</code>!</strong></p> <p>Moreover, the build system recompiles <code>SomeFile.cpp</code> when I'm changing things in <code>MyVector.cpp</code>.</p> <p>When I'm deleting the <code>testVector</code> function from <code>MyVector.cpp</code> and move it to a new <code>NewFile.cpp</code> - it compiles.</p> <p>No, I didn't include the <code>cpp</code> file by mistake, honest, I double checked it, and <code>grep</code>ed all my source code.</p> <p>I have no idea what's going on. I'll be glad for any clue.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload