gcc4 Questions

6

Solved

I'm trying to install Imagemagick on OSX Lion but something is not working as expected. -> brew install imagemagick /usr/local/git/bin/git ==> Cloning https://github.com/adamv/ImageMagick.g...
Inseparable asked 13/8, 2011 at 23:41

3

Solved

I'm stuck on GCC4.8 for the time being. I want to print out the current time as something other than seconds. If put_time worked, my code would be something simple, like this: std::cout << s...
Thrippence asked 24/5, 2016 at 18:57

6

Solved

I am porting an application to an ARM platform in C, the application also runs on an x86 processor, and must be backward compatible. I am now having some issues with variable alignment. I have rea...
Kissee asked 31/3, 2010 at 15:27

3

Solved

GCC 4.x doesn't accept the --std=c++14 switch for C++14 code - it takes --std=c++1y instead. Later versions take --std=c++1z but (probably) not --std=c++17 which has not been set yet (writing this ...
Tore asked 16/3, 2017 at 13:0

1

Solved

The gcc info file says in the section on x86-64 specific flags, among other things: There is no `-march=generic' option because `-march' indicates the instruction set the compiler can use, and ther...
Henrik asked 5/1, 2015 at 20:0

4

Consider the following code: template < typename T > struct A { struct B { }; }; template < typename T > void f( typename A<T>::B ) { } int main() { A<int>::B x; f( x ...
Oscillation asked 3/11, 2010 at 22:29

3

When using gcc version 4.3.2, I see how to generate specs using: $ /usr/local/gcc-4.3.2/bin/gcc -v Using built-in specs Now changing to the same directory as libgcc: cd /usr/local/gcc-4.3.2/lib...
Thereof asked 25/4, 2011 at 12:45

6

Solved

In chapter 3 of Programming: Principles and Practice using C++ (sixth printing), Stroustrup states (p.68): "Note that sqrt() is not defined for an int". Here is a simple C++ program based on that ...
Birthday asked 26/10, 2013 at 23:51

2

Solved

I read about the return values between function calls, and experimented with the following code snippet : /* file structaddr.c */ #include <stdio.h> #define MSIZE 10 struct simple { cha...
Appetizing asked 27/7, 2013 at 20:14

2

Solved

Is it GCC 4.7.0 or is it me? What do I do wrong? This throws an std::system_error "operation not permitted" exception: struct DumbFib { size_t operator()(size_t n) { return fib(n); } static siz...
Lair asked 9/9, 2011 at 9:24

4

Solved

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf /usr/bin/make -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/cppapplication_1 mkdir -p build/Debug/GNU-MacOSX rm -f build...
Backer asked 8/12, 2010 at 19:1

2

Solved

I inherited a C++ project. I'm building in RHEL 5.5 with GCC 4.1.2 via a makefile. The project is huge (hundreds of files) and in general the code is pretty good. However, every so often during com...
Activate asked 29/1, 2013 at 20:37

1

boost::posix_time::ptime parseDate(const std::string& format, const std::string& localDate) { std::istringstream is(localDate); is.imbue(std::locale(is.getloc(), new boost::local_time::lo...
Aegis asked 20/6, 2012 at 14:8

3

Solved

Is there a way to change the specs file so that it will pass -march=native if nothing is specified in command line? Related things in the default specs file is: *cc1: %(cc1_cpu) *cc1_cpu: %{marc...
Convergent asked 2/1, 2012 at 22:1

1

I'm trying to build qtCreator 2.3 with gcc 4.7 and I'm getting following error: error: unable to find string literal operator "" I'm using mingw32-make -lto as qtCreator source dir. Any thoug...
Claraclarabella asked 26/4, 2012 at 8:41

3

Solved

I've looked at these and they do not answer my question: variable-sized object may not be initialized C compile error: "Variable-sized object may not be initialized" Error: Variable-sized...
Parsaye asked 12/4, 2012 at 18:17

1

Solved

I have a C program with a couple of static functions that are not (yet) used. I want to disable warnings for those specific functions. I do not want to disable all -Wunused-function warnings. I am ...
Ruhnke asked 23/3, 2012 at 0:46

2

Solved

Since Apple do not support GCC 4.6 or GCC 4.7, I just switched to MacPorts' build of GCC 4.6/4.7. However, I had a problem to build my code in "Universal" architecture. Traditionally, I'd do g++ -...
Avernus asked 14/12, 2011 at 0:5

3

The following code compiles just fine under Visual Studio but neither gcc 4.6.2 or 4.7 can handle it. It seems to be valid but gcc can't seem to resolve the difference between const and non const p...
Ufo asked 27/1, 2012 at 18:6

2

I have the following C++ code and it gives me a surprise. The problem is that if I throw something except re-throw inside the catch block, the program will be terminated by calling abort and give t...
Confiscate asked 23/1, 2012 at 16:43

1

Solved

I am observing a difference when trying to do the same operation on GCC 4.4 and GCC 4.5. Because the code I am doing this with is proprietary, I am unable to provide it, but I am observing a simila...
Yokum asked 4/1, 2012 at 10:49

2

Solved

I know, it's an irony to compile a compiler. But I need a specific version of this compiler, and the CentOS 5.x repositories have not the most recent versions of GCC. The version what i need is 4....
Rebatement asked 28/12, 2011 at 3:31

6

Solved

float myArray[myArraySize] = {1}; In the expression above only the first element is init with 1. How can you init all the elements with a value using a compound literals(not memset)? I'm using G...
Cullin asked 25/10, 2011 at 18:30

4

No, this is not a duplicate of How to detect integer overflow?. The issue is the same but the question is different. The gcc compiler can optimize away an overflow check (with -O2), for example:...
Maleate asked 28/7, 2011 at 8:42

3

Solved

Premise I’m using a C library (from C++) which provides the following interface: void register_callback(void* f, void* data); void invoke_callback(); Problem Now, I need to register a function...
Threnode asked 18/7, 2011 at 14:29

© 2022 - 2024 — McMap. All rights reserved.