Category : g++

I was trying to compile the following program with Homebrew g++ installed on my Mac M1: // name: a.cpp #include <bits/stdc++.h> using namespace std; vector<int> vec[1145140]; int main(){ return 0; } The compiling command is /opt/homebrew/bin/g++-11 a.cpp. Then it reported error as follows: /var/folders/qw/n1dkgxj51tb7whl23crnsl880000gn/T//ccrMi6mY.s:431:2: error: addend too big for relocation adrp x0, [email protected]+27483360 ^ /var/folders/qw/n1dkgxj51tb7whl23crnsl880000gn/T//ccrMi6mY.s:432:2: ..

Read more

I have been coding for quite a few years now, but have only just recently started getting into C++. I have already made quite a few programs in it, but have recently started running into some odd behaviour. The cases are simple enough that I expect this to be an error with my environment, and ..

Read more

I want to prove that it is not possible to reliably throw exceptions through a C-function calling a C++-callback. That’s while with the older EH mechanism there’s no unwinding of the C function’s stack and with the newer table-driven EH there are no EH-tables for the return-addresses inside the C-function. This is the C++-source: #include ..

Read more