===== ToDo ===== * https://bugs.launchpad.net/ubuntu/+source/gcc-4.3/+bug/362217 * [[libc]] : http://forum.buffalo.nas-central.org/viewtopic.php?f=19&t=20744 * http://maemo.org/community/maemo-developers/upgrade_gcc_version_to_4-1/ * https://gcc.gnu.org/onlinedocs/gcc/ * https://developers.redhat.com/articles/2022/09/17/gccs-new-fortification-level#1__a_new_builtin_provides_enhanced_buffer_size_detection ===== g++ a [[Libre]] [[C++]] [[Compiler]] ===== g++ -std=c++98 -fno-gnu-keywords -ffor-scope -Wall -pedantic -W \ *Wold-style-cast -Woverloaded-virtual -Wsign-promo -Wundef \ *Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Winline \ *Wdisabled-optimization -O2 ===== VERSIONS ===== * https://launchpad.net/ubuntu/+source/gcc-4.1 # UbuntU/HardY * http://packages.qa.debian.org/g/gcc-4.1.html # DebiaN/SqueezE * 4.6 : openSUSE 12.1, ubuntu12 http://distrowatch.com/dwres.php?firstlist=fedora&secondlist=opensuse&firstversions=11&resource=compare-packages&secondversions=7 * 5 : https://fedoraproject.org/wiki/Releases/22/ChangeSet#GCC5 (5.3.1) * http://distrowatch.com/dwres.php?firstlist=ubuntu&secondlist=debian&firstversions=9&resource=compare-packages&secondversions=3 ==== GCC ==== Control warnings #pragma warning(disable: 985) // identifier truncated in debug http://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/Warning-Options.html#Warning%20Options http://gcc.gnu.org/ml/gcc/1998-09/msg00446.html tells version, macro etc # gcc -v -E -march=i686 - # on SunOS Reading specs from /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/specs gcc version 2.8.1 /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/cpp -lang-c -v *undef -D**GNUC**=2 -D__GNUC_MINOR__=8 *Dsparc -Dsun -Dunix -D**svr4** -D**SVR4 -D**sparc** -D**sun__ *D**unix** -D**svr4** -D**SVR4 -D**sparc -D**sun -D**unix *Asystem(unix) -Asystem(svr4) -D__GCC_NEW_VARARGS__ *Acpu(sparc) -Amachine(sparc) - GNU CPP version 2.8.1 (sparc) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/local/gcc-2.8.1/sparc-sun-solaris2.7/include /usr/local/gcc-2.8.1/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/include /usr/include End of search list. about the only common versioning you get is the : **STDC** def __cplusplus is the equivalent for C++ With an optimized compiler, I specifically used: *O3 -pipe -fomit-frame-pointer -funroll-loops *march=pentium3 -mcpu=pentium3 -mfpmath=sse -mmmx -msse ==== GCC Warnings ==== http://icecube.wisc.edu/~dglo/gcc-warnings.html snprintf : too many arguments for format unknown conversion type character 'l' in format http://stackoverflow.com/questions/2844/how-do-you-printf-an-unsigned-long-long-int $FILE.h:71: warning: '$CLASS' has a field '$CLASS::$MEMBER' whose type uses the anonymous namespace ==== GCC errors ===== incompatible types in assignment * http://www.physics.ucla.edu/picl/newsw/xcoralhtml/node110.html cannot convert to a pointer type Make sure you're passing address with '&' * http://opengrok.creo.hu/dragonfly/xref/src/contrib/gcc-3.4/gcc/convert.c sorry, unimplemented: inlining failed in call to '': function body not available ==== LD ==== http://stackoverflow.com/questions/4052542/gcc-m32-flag-usr-bin-ld-skipping-incompatible/7687067#7687067 ld: skipping incompatible ${FILE_SO} when searching for -l${LIB_NAME} http://stackoverflow.com/questions/11703709/hidden-symbol-atexit-is-referenced-by-dso-when-using-libtool-with-gcov Hidden symbol `$SYMBOL' is referenced by DSO ==== g++ error: ==== "error: too few template-parameter-lists" * http://c2.com/cgi/wiki?TooFewTemplateParameterLists * http://boost.2283326.n4.nabble.com/String-literals-concatenation-issue-when-using-BOOST-CURRENT-FUNCTION-td2649819.html error: expected ')' before '__PRETTY_FUNCTION__' @tag: [[preprocessor]] "fatal error: asm/errno.h: No such file or directory" https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/825574 sudo aptitude install g++-4.6-multilib sudo ln -fs asm-generic /usr/include/asm #error "Requires IEEE 754 floating point!" * http://stackoverflow.com/questions/752309/ensuring-c-doubles-are-64-bits error: 'constexpr' needed for in-class initialization of static data member error: reinterpret_cast from integer to pointer * see CasT page ==== g++ warning: ==== warning: dereferencing type-punned pointer will break strict-aliasing rules http://gcc.gnu.org/ml/gcc-help/2007-07/msg00294.html https://secure.wikimedia.org/wikipedia/en/wiki/Type_punning ==== ERRORS ==== "error: invalid use of incomplete type " "error: forward declaration of" http://stackoverflow.com/questions/1915759/forward-declaration-and-typeid "undefined reference to `typeinfo for " http://stackoverflow.com/questions/307352/g-undefined-reference-to-typeinfo ===== MISC ===== ed2k://|file|gcc-core-3.4.4-20050522-1.tar.gz|3523621|0e5c68b313769e497a4ccb75330a6c96| ed2k://|file|gcc-g++-3.4.4-20050522-1.tar.gz|4705756|475bbdbaff41498d24d227ed7061ab7f| ed2k://|file|gcc-java-3.4.4-20050522-1.tar.gz|16162510|dce1485a3515182847f35a7ab76ff7cb| * http://www.network-theory.co.uk/docs/gccintro/gccintro_71.html# [[type]]s * https://kristerw.blogspot.com/2017/09/useful-gcc-warning-options-not-enabled.html# QualitY ==== MORE ==== @tag: [[g++]] [[CPlusPlus]] GnU LangC CompileR [[GNU]] [[ProgrammingTool]] [[Compiler]] [[C]] [[C++]] [[Java]] [[MSVC]] [[GCJ]] [[gxx]] [[g++]]