1
vote
1answer
405 views

register variable in C and C++

I know the concept of register variable and it's use cases but there are few questions in my mind based on what I have tried. I cannot access the address of a register variable in C though I can do ...
7
votes
3answers
293 views

Is there a way to use gcc as a library?

Anyone knows a solution that works something like this: #include <stdio.h> #include <gcc.h> /* This .h is what I'm looking for. */ int main (void) { /* variables declaration (...) */ ...
3
votes
2answers
450 views

How do .so files avoid problems associated with passing header-only templates like MS dll files have?

Based on the discussion around this question. I'd like to know how .so files/the ELF format/the gcc toolchain avoid problems passing classes defined purely in header files (like the std library). ...
3
votes
3answers
3k views

Whether to use -pedantic flag in g++ or not?

I'm learning C++ and I'm using g++ on Linux for practicing. 1) I want to know if people working as programmers use g++ -pedantic flag and also it's importance in real world. 2) What about other ...