Mapping of options

The following table provides a mapping of classic IBM® XL C/C++ compiler options and Clang options that have the same or similar functions. 

Suboptions of these options do not necessarily have a one-to-one mapping.
Classic options supported by IBM XL C/C++ for AIX® 16.1.0 Similar/equivalent Clang options supported by IBM Open XL C/C++ for AIX 17.1.0
-+ -x c++
-# -###
-C! None; The default compiler behavior is as if -C! was in effect.
-E -E or -E -x c for files with unrecognized file name suffixes
-f -Wl,-f
-F None
-G -shared -Wl,-G
-ma None
-O -O0, -O1, -O2, -O3, or -Ofast
-p None
-pg None
-P -E -P -o file.i obtains behavior similar to the classic -P option.
-q32 -m32
-q64 -m64
-qaggrcopy None; The default compiler behavior is as if -qaggrcopy was in effect.
-qalias=ansi -fstrict-aliasing
-qalias=noansi -fno-strict-aliasing
-qalias=[no]addrtaken None
-qalias=[no]allptrs None
-qalias=[no]global None
-qalias=[no]restrict None
-qalias=[no]typeptr None
-qalign None
-qalignrulefor None
-qalloca None
-qaltivec -maltivec
-qnoaltivec -mnoaltivec
-qarch -mcpu
-qasm -fasm
-qasm_as None
-qassert None
-qattr None
-qbitfields=signed -fsigned-bitfields
-qbitfields=unsigned None
-qcache None
-qchars=signed -fsigned-char
-qchars=unsigned -funsigned-char
-qcheck None
-qcinc None
-qcompact -Os and -Oz
-qconcurrentupdate None
-qcpluscmt None; The default compiler behavior is as if -qcpluscmt was in effect.
-qcrt None; The default compiler behavior is as if -qcrt was in effect.
-qnocrt -nostartfiles
-qc_stdinc -isystem
-qcpp_stdinc -isystem
-qdataimported None
-qdatalocal None
-qdbcs None; The compiler supports UTF-8 source files all the time.
-qdbgfmt=dwarf -gdwarf-3
-qdbgfmt=dwarf4 -gdwarf-4
-qdbgfmt=stabstring None
-qdbxextra -fno-eliminate-unused-debug-types
-qdfp None
-qdigraph -fdigraphs
-qnodigraph -fno-digraphs
-qdirectstorage None
-qdollar -fdollars-in-identifiers
-qdpcl None
-qdump_class_hierarchy -Xclang -fdump-record-layouts
-qeh -fexceptions
-qnoeh -fignore-exceptions
-qenum None
-qexpfile None
-qextchk None
-qfdpr None
-qflag None
-qfloat=[no]dfpemulate None
-qfloat=[no]fenv None
-qfloat=[no]fltint None
-qfloat=[no]fold None
-qfloat=[no]hscmplx None
-qfloat=[no]hsflt None
-qfloat=[no]hssngl None
-qfloat=maf -ffp-contract=fast
-qfloat=nomaf -ffp-contract=off
-qfloat=[no]nans None
-qfloat=relax -fno-honor-nans -fno-honor-infinities -fdenormal-fp-math=positive-zero -fno-signed-zeros -fno-rounding-math -freciprocal-math
-qfloat=norelax -fhonor-nans -fhonor-infinities -fdenormal-fp-math=ieee -fsigned-zeros -frounding-math -fno-reciprocal-math
-qfloat=[no]rndsngl None
-qfloat=[no]rngchk None
-qfloat=rrm -frounding-math
-qfloat=norrm -fno-rounding-math
-qfloat=[no]rsqrt None
-qfloat=[no]single None
-qfloat=[no]spnans None
-qfloat=[no]subnormals None
-qflttrap None
-qformat -Wformat
-qfullpath None; The default compiler behavior is as if -qfullpath was in effect.
-qfuncsect -ffunction-sections
-qnofuncsect -fno-function-sections
-qfunctrace None
-qgenproto None
-qhalt -Werror
-qhaltonmsg None
-qheapdebug None
-qhelp -help
-qhot -Ofast
-qhot=suboption None
-qidirfirst None
-qignerrno -fno-math-errno
-qignprag None
-qinclude -include
-qinfo None
-qinitauto None
-qinlglue None; The default compiler behavior is as if -qnoinlglue was in effect.
-qinline=auto -finline-functions
-qinline=noauto -fno-inline-functions -finline-hint-functions
-qnoinline -fno-inline
-qipa -flto
-qisolated_call None
-qkeepinlines None
-qkeepparm None
-qkeyword None
-qlanglvl -std
-qlargepage None
-qldbl128 None
-qlongdouble None
-qlib -nodefaultlibs
-qnolibansi -fno-builtin
-qlibmpi None; The default compiler behavior is as if -qnolibmpi was in effect.
-qlinedebug -g1 or -gline-tables-only
-qlist -S
-qlistfmt None
-qlistopt None
-qlonglit None
-qlonglong None; The default compiler behavior is as if -qlonglong was in effect.
-qmacpstr -fpascal-strings
-qmakedep None
-qmaxerr -ferror-limit
-qmaxmem None
-qmbcs None; The compiler supports UTF-8 source files all the time.
-qminimaltoc None
-qmkshrobj -shared
-qnamemangling None
-qobjmodel None
-qoldpassbyvalue None
-qoptdebug None
-qoptfile @file
-qoptimize --optimize
-qpack_semantic=gnu -fno-xl-pragma-pack
-qpack_semantic=ibm -fxl-pragma-pack
-qpath None
-qpdf1 -fprofile-generate
-qpdf2 -fprofile-use
-qphsinfo -ftime-report
-qpic=small -fpic
-qpic=big -fPIC -mcmodel=large -Wl,-bbigtoc
-qppline None
-qnoppline -E -P
-qprefetch None
-qprint None
-qpriority None
-qprocimported None
-qproclocal None
-qprocunknown None
-qprofile None
-qproto None; The default compiler behavior is as if -qnoproto was in effect.
-qreport None
-qreserved_reg None
-qrestrict -frestrict-args
-qro None; The default compiler behavior is as if -qro was in effect.
-qroconst None; The default compiler behavior is as if -qroconst was in effect.
-qroptr None; The default compiler behavior is as if -qnoroptr was in effect.
-qnortti -fno-rtti
-qsaveopt None
-qshowinc None
-qshowmacros -dM
-qshowpdf None
-qsimd=noauto -fno-vectorize -fno-slp-vectorize
-qskipsrc None
-qslmtags None
-qsmallstack None
-qsmp None
-qsource None
-qsourcetype -x
-qsourcetype=default -x none
-qspeculateabsolutes None
-qspill None
-qsrcmsg -fcaret-diagnostics
-qnosrcmsg -fno-caret-diagnostics
-qstackprotect -fstack-protector
-qstaticinline None
-qstatsym None
-qstdinc -nostdinc
-qnostdinc -nostdinc++
-qstrict=association -fno-associative-math
-qstrict=noassociation -fassociative-math
-qstrict=nans -fhonor-nans
-qstrict=nonans -fno-honor-nans
-qstrict=infinities -fhonor-infinities
-qstrict=noinfinities -fno-honor-infinities
-qstrict=zerosigns -fsigned-zeros
-qstrict=nozerosigns -fno-signed-zeros
-qstrict=subnormals -fdenormal-fp-math=ieee
-qstrict=nosubnormals -fdenormal-fp-math=positive-zero or -fdenormal-fp-math=preserve-sign
-qstrict=operationprecision -fno-reciprocal-math
-qstrict=nooperationprecision -freciprocal-math
-qstrict=[no]vectorprecision None
-qstrict=[no]reductionorder None
-qstrict=[no]guards None
-qstrict=[no]library None
-qstrict=order -fno-associative-math
-qstrict=noorder -fassociative-math
-qstrict=ieeefp -fhonor-nans -fhonor-infinities -fdenormal-fp-math=ieee -fsigned-zeros -frounding-math -fno-reciprocal-math
-qstrict=noieeefp -fno-honor-nans -fno-honor-infinities -fdenormal-fp-math=positive-zero -fno-signed-zeros -fno-rounding-math -freciprocal-math
-qstrict=exceptions -fhonor-nans -fhonor-infinities -fdenormal-fp-math=ieee -ffp-exception-behavior=strict
-qstrict=noexceptions -fno-honor-nans -fno-honor-infinities -fdenormal-fp-math=positive-zero -ffp-exception-behavior=ignore
-qstrict=precision -fno-associative-math -fdenormal-fp-math=ieee -fno-reciprocal-math
-qstrict=noprecision -fassociative-math -fdenormal-fp-math=positive-zero -freciprocal-math
-qstrict_induction None
-qsuppress None
-qsymtab None
-qsyntaxonly -fsyntax-only
-qtabsize None
-qtbtable None; The default compiler behavior is as if -qtbtable=full was in effect.
-qtempinc None
-qtemplatedepth -ftemplate-depth
-qtemplaterecompile None
-qtemplateregistry None
-qtempmax None
-qthreaded -pthread
-qtimestamps None
-qtls -ftls-model
-qtmplinst None
-qtmplparse None
-qtocdata None
-qtocmerge None
-qtrigraph -trigraphs
-qtune None
-qtwolink -bcdtors:mbr
-qunique None
-qunroll -funroll-loops
-qunroll=yes None
-qnounroll -fno-unroll-loops
-qunwind None
-qupconv None; The default compiler behavior is as if -qnoupconv was in effect.
-qutf None
-qvecnvol -mabi=vec-extabi
-qnovecnvol -mabi=default
-qversion --version
-qvisibility None; The default compiler behavior is as if -qnovisibility was in effect.
-qvrsave None; The default compiler behavior is as if -qnovrsave was in effect.
-qwarn0x None
-qwarn64 None
-qweakexp None
-qweaksymbol None; The default compiler behavior is as if -qweaksymbol was in effect.
-qxcall None
-qxref None
-s -Wl,-s
-t None
-v -v
-V -v
-y None
-Z -Wl,-Z

Related information