Description:
GNU C Compiler (gcc) user queries and answers.
|
|
|
dynamic path in global_linker_script
|
| |
Hi all
here is my linker script:
.libgccc : {/usr/lib/gcc-4.6.2/libgcc.a}
How can I pass the output from this command to linker script:
gcc --print-file-name=libgcc.a
thanks
from Peter (cmk...@hotmail.com)
|
|
Query regarding pointer analysis
|
| |
We are trying to find how pointer analysis information is being used
by other optimizations in gcc. We disovered that pointer information
is stored as a bitmap which is accessed via a macro named
"SSA_NAME_PTR_INFO". However, when we tried to find where this macro
is being used, we came up with following observations:... more »
|
|
why are there __assert_fail() symbols in libstdc++.so?
|
| |
Hi all,
After building gcc 4.7.0, I found that libstdc++.so has symbol references to __assert_fail(). (This is used by the assert() macro for DEBUG builds.)
I was expecting gcc to build the C++ libraries with -NDEBUG.
Is there some ./configure switch I need to build optimised non-debug libraries?... more »
|
|
-no-cpp-precomp flag (gcc-4.7.0)
|
| |
Years ago, the -no-cpp-precomp flag was set for building some stuff (notably Apache) with Darwin (OS X). It's not been used for a while, but Apache still throws it in anyway, which didn't matter until gcc-4.7.0, which stops when it finds an "unrecognized command line option." Same thing for the "-V" option. So... more »
|
|
GCC C++11 support for <regex>
|
| |
Hi,
I looked at the status page:
[link]
and it doesn't mention support for <regex> one way or the other.
I wrote this tiny test program:
////////////////////////////// //////////////////////////////
...
int main()
{
std::string s("ABC def");
std::regex rx("de");... more »
|
|
How to access initialized values of global variables
|
| |
I am trying to fetch the initialized values of global variables.
For eg : int i = 10;
I am able to extract the value using DECL_INITIAL.
But when I have a case like below,
struct node
{
int x;
int y;
...
struct node n1=
{
99,
88,
...
I get value as {.x=99, .y=88}... more »
|
|
complex numbers and optimization flags
|
| |
The following bit of code uses the complex data type to construct 5 complex numbers of the form
e^{i PI * j/4}
with j = 0, 1, 2, 3,4.
It then stores them in a double array, with the real components in 0-4, and the imaginary components in 5-9. When I compile and run the code with O2 flags, I get what I'd expect:... more »
|
|
linker was not configured to use sysroots
|
| |
I am using Linux/Kubuntu OS. I have recently updated to 12.04 and I am getting problem with gcc. Using the simple program
...main()
{fprintf(stdout,"hello world\n");
return 0;
...
the compilation (gcc -c test.c) is ok but when I try to link (gcc test.o) I get
/usr/local/bin/ld: this linker was not configured to use sysroots... more »
|
|
|