text:
<title>Option Summary - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="next" href="Overall-Options.html#Overall-Options" title="Overall Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">

<meta http-equiv="Content-Style-Type" content="text/css">

Next: Overall Options,
Up: Invoking GCC

3.1 Option Summary

Here is a summary of all the options, grouped by type.  Explanations are
in the following sections.

Overall Options
See Options Controlling the Kind of Output.

          -c  -S  -E  -o <var>file</var>  -x <var>language</var>
          -v  -###  --help[=<var>class</var>[,...]]  --target-help  --version
          -pass-exit-codes  -pipe  -specs=<var>file</var>  -wrapper
          @<var>file</var>  -ffile-prefix-map=<var>old</var>=<var>new</var>
          -fplugin=<var>file</var>  -fplugin-arg-<var>name</var>=<var>arg</var>
          -fdump-ada-spec[-slim]  -fada-spec-parent=<var>unit</var>  -fdump-go-spec=<var>file</var>

C Language Options
See Options Controlling C Dialect.

          -ansi  -std=<var>standard</var>  -fgnu89-inline
          -fpermitted-flt-eval-methods=<var>standard</var>
          -aux-info <var>filename</var>  -fallow-parameterless-variadic-functions
          -fno-asm  -fno-builtin  -fno-builtin-<var>function</var>  -fgimple
          -fhosted  -ffreestanding  -fopenacc  -fopenmp  -fopenmp-simd
          -fms-extensions  -fplan9-extensions  -fsso-struct=<var>endianness</var>
          -fallow-single-precision  -fcond-mismatch  -flax-vector-conversions
          -fsigned-bitfields  -fsigned-char
          -funsigned-bitfields  -funsigned-char

C++ Language Options
See Options Controlling C++ Dialect.

          -fabi-version=<var>n</var>  -fno-access-control
          -faligned-new=<var>n</var>  -fargs-in-order=<var>n</var>  -fcheck-new
          -fconstexpr-depth=<var>n</var>  -fconstexpr-loop-limit=<var>n</var>
          -ffriend-injection
          -fno-elide-constructors
          -fno-enforce-eh-specs
          -ffor-scope  -fno-for-scope  -fno-gnu-keywords
          -fno-implicit-templates
          -fno-implicit-inline-templates
          -fno-implement-inlines  -fms-extensions
          -fnew-inheriting-ctors
          -fnew-ttp-matching
          -fno-nonansi-builtins  -fnothrow-opt  -fno-operator-names
          -fno-optional-diags  -fpermissive
          -fno-pretty-templates
          -frepo  -fno-rtti  -fsized-deallocation
          -ftemplate-backtrace-limit=<var>n</var>
          -ftemplate-depth=<var>n</var>
          -fno-threadsafe-statics  -fuse-cxa-atexit
          -fno-weak  -nostdinc++
          -fvisibility-inlines-hidden
          -fvisibility-ms-compat
          -fext-numeric-literals
          -Wabi=<var>n</var>  -Wabi-tag  -Wconversion-null  -Wctor-dtor-privacy
          -Wdelete-non-virtual-dtor  -Wliteral-suffix  -Wmultiple-inheritance
          -Wnamespaces  -Wnarrowing
          -Wnoexcept  -Wnoexcept-type  -Wclass-memaccess
          -Wnon-virtual-dtor  -Wreorder  -Wregister
          -Weffc++  -Wstrict-null-sentinel  -Wtemplates
          -Wno-non-template-friend  -Wold-style-cast
          -Woverloaded-virtual  -Wno-pmf-conversions
          -Wsign-promo  -Wvirtual-inheritance

Objective-C and Objective-C++ Language Options
See Options Controlling Objective-C and Objective-C++ Dialects.

          -fconstant-string-class=<var>class-name</var>
          -fgnu-runtime  -fnext-runtime
          -fno-nil-receivers
          -fobjc-abi-version=<var>n</var>
          -fobjc-call-cxx-cdtors
          -fobjc-direct-dispatch
          -fobjc-exceptions
          -fobjc-gc
          -fobjc-nilcheck
          -fobjc-std=objc1
          -fno-local-ivars
          -fivar-visibility=[public|protected|private|package]
          -freplace-objc-classes
          -fzero-link
          -gen-decls
          -Wassign-intercept
          -Wno-protocol  -Wselector
          -Wstrict-selector-match
          -Wundeclared-selector

Diagnostic Message Formatting Options
See Options to Control Diagnostic Messages Formatting.

          -fmessage-length=<var>n</var>
          -fdiagnostics-show-location=[once|every-line]
          -fdiagnostics-color=[auto|never|always]
          -fno-diagnostics-show-option  -fno-diagnostics-show-caret
          -fdiagnostics-parseable-fixits  -fdiagnostics-generate-patch
          -fdiagnostics-show-template-tree -fno-elide-type
          -fno-show-column

Warning Options
See Options to Request or Suppress Warnings.

          -fsyntax-only  -fmax-errors=<var>n</var>  -Wpedantic
          -pedantic-errors
          -w  -Wextra  -Wall  -Waddress  -Waggregate-return  -Waligned-new
          -Walloc-zero  -Walloc-size-larger-than=<var>n</var>
          -Walloca  -Walloca-larger-than=<var>n</var>
          -Wno-aggressive-loop-optimizations  -Warray-bounds  -Warray-bounds=<var>n</var>
          -Wno-attributes  -Wbool-compare  -Wbool-operation
          -Wno-builtin-declaration-mismatch
          -Wno-builtin-macro-redefined  -Wc90-c99-compat  -Wc99-c11-compat
          -Wc++-compat  -Wc++11-compat  -Wc++14-compat
          -Wcast-align  -Wcast-align=strict  -Wcast-function-type  -Wcast-qual
          -Wchar-subscripts  -Wchkp  -Wcatch-value  -Wcatch-value=<var>n</var>
          -Wclobbered  -Wcomment  -Wconditionally-supported
          -Wconversion  -Wcoverage-mismatch  -Wno-cpp  -Wdangling-else  -Wdate-time
          -Wdelete-incomplete
          -Wno-deprecated  -Wno-deprecated-declarations  -Wno-designated-init
          -Wdisabled-optimization
          -Wno-discarded-qualifiers  -Wno-discarded-array-qualifiers
          -Wno-div-by-zero  -Wdouble-promotion
          -Wduplicated-branches  -Wduplicated-cond
          -Wempty-body  -Wenum-compare  -Wno-endif-labels  -Wexpansion-to-defined
          -Werror  -Werror=*  -Wextra-semi  -Wfatal-errors
          -Wfloat-equal  -Wformat  -Wformat=2
          -Wno-format-contains-nul  -Wno-format-extra-args
          -Wformat-nonliteral -Wformat-overflow=<var>n</var>
          -Wformat-security  -Wformat-signedness  -Wformat-truncation=<var>n</var>
          -Wformat-y2k  -Wframe-address
          -Wframe-larger-than=<var>len</var>  -Wno-free-nonheap-object  -Wjump-misses-init
          -Wif-not-aligned
          -Wignored-qualifiers  -Wignored-attributes  -Wincompatible-pointer-types
          -Wimplicit  -Wimplicit-fallthrough  -Wimplicit-fallthrough=<var>n</var>
          -Wimplicit-function-declaration  -Wimplicit-int
          -Winit-self  -Winline  -Wno-int-conversion  -Wint-in-bool-context
          -Wno-int-to-pointer-cast  -Winvalid-memory-model  -Wno-invalid-offsetof
          -Winvalid-pch  -Wlarger-than=<var>len</var>
          -Wlogical-op  -Wlogical-not-parentheses  -Wlong-long
          -Wmain  -Wmaybe-uninitialized  -Wmemset-elt-size  -Wmemset-transposed-args
          -Wmisleading-indentation  -Wmissing-attributes -Wmissing-braces
          -Wmissing-field-initializers  -Wmissing-include-dirs
          -Wno-multichar  -Wmultistatement-macros  -Wnonnull  -Wnonnull-compare
          -Wnormalized=[none|id|nfc|nfkc]
          -Wnull-dereference  -Wodr  -Wno-overflow  -Wopenmp-simd
          -Woverride-init-side-effects  -Woverlength-strings
          -Wpacked  -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded
          -Wparentheses  -Wno-pedantic-ms-format
          -Wplacement-new  -Wplacement-new=<var>n</var>
          -Wpointer-arith  -Wpointer-compare  -Wno-pointer-to-int-cast
          -Wno-pragmas  -Wredundant-decls  -Wrestrict  -Wno-return-local-addr
          -Wreturn-type  -Wsequence-point  -Wshadow  -Wno-shadow-ivar
          -Wshadow=global,  -Wshadow=local,  -Wshadow=compatible-local
          -Wshift-overflow  -Wshift-overflow=<var>n</var>
          -Wshift-count-negative  -Wshift-count-overflow  -Wshift-negative-value
          -Wsign-compare  -Wsign-conversion  -Wfloat-conversion
          -Wno-scalar-storage-order  -Wsizeof-pointer-div
          -Wsizeof-pointer-memaccess  -Wsizeof-array-argument
          -Wstack-protector  -Wstack-usage=<var>len</var>  -Wstrict-aliasing
          -Wstrict-aliasing=n  -Wstrict-overflow  -Wstrict-overflow=<var>n</var>
          -Wstringop-overflow=<var>n</var> -Wstringop-truncation
          -Wsuggest-attribute=[pure|const|noreturn|format|malloc]
          -Wsuggest-final-types   -Wsuggest-final-methods  -Wsuggest-override
          -Wmissing-format-attribute  -Wsubobject-linkage
          -Wswitch  -Wswitch-bool  -Wswitch-default  -Wswitch-enum
          -Wswitch-unreachable  -Wsync-nand
          -Wsystem-headers  -Wtautological-compare  -Wtrampolines  -Wtrigraphs
          -Wtype-limits  -Wundef
          -Wuninitialized  -Wunknown-pragmas
          -Wunsuffixed-float-constants  -Wunused  -Wunused-function
          -Wunused-label  -Wunused-local-typedefs  -Wunused-macros
          -Wunused-parameter  -Wno-unused-result
          -Wunused-value  -Wunused-variable
          -Wunused-const-variable  -Wunused-const-variable=<var>n</var>
          -Wunused-but-set-parameter  -Wunused-but-set-variable
          -Wuseless-cast  -Wvariadic-macros  -Wvector-operation-performance
          -Wvla  -Wvla-larger-than=<var>n</var>  -Wvolatile-register-var  -Wwrite-strings
          -Wzero-as-null-pointer-constant  -Whsa

C and Objective-C-only Warning Options

          -Wbad-function-cast  -Wmissing-declarations
          -Wmissing-parameter-type  -Wmissing-prototypes  -Wnested-externs
          -Wold-style-declaration  -Wold-style-definition
          -Wstrict-prototypes  -Wtraditional  -Wtraditional-conversion
          -Wdeclaration-after-statement  -Wpointer-sign

Debugging Options
See Options for Debugging Your Program.

          -g  -g<var>level</var>  -gdwarf  -gdwarf-<var>version</var>
          -ggdb  -grecord-gcc-switches  -gno-record-gcc-switches
          -gstabs  -gstabs+  -gstrict-dwarf  -gno-strict-dwarf
          -gas-loc-support  -gno-as-loc-support
          -gas-locview-support  -gno-as-locview-support
          -gcolumn-info  -gno-column-info
          -gstatement-frontiers  -gno-statement-frontiers
          -gvariable-location-views  -gno-variable-location-views
          -ginternal-reset-location-views  -gno-internal-reset-location-views
          -ginline-points  -gno-inline-points
          -gvms  -gxcoff  -gxcoff+  -gz[=<var>type</var>]
          -fdebug-prefix-map=<var>old</var>=<var>new</var>  -fdebug-types-section
          -fno-eliminate-unused-debug-types
          -femit-struct-debug-baseonly  -femit-struct-debug-reduced
          -femit-struct-debug-detailed[=<var>spec-list</var>]
          -feliminate-unused-debug-symbols  -femit-class-debug-always
          -fno-merge-debug-strings  -fno-dwarf2-cfi-asm
          -fvar-tracking  -fvar-tracking-assignments

Optimization Options
See Options that Control Optimization.

          -faggressive-loop-optimizations  -falign-functions[=<var>n</var>]
          -falign-jumps[=<var>n</var>]
          -falign-labels[=<var>n</var>]  -falign-loops[=<var>n</var>]
          -fassociative-math  -fauto-profile  -fauto-profile[=<var>path</var>]
          -fauto-inc-dec  -fbranch-probabilities
          -fbranch-target-load-optimize  -fbranch-target-load-optimize2
          -fbtr-bb-exclusive  -fcaller-saves
          -fcombine-stack-adjustments  -fconserve-stack
          -fcompare-elim  -fcprop-registers  -fcrossjumping
          -fcse-follow-jumps  -fcse-skip-blocks  -fcx-fortran-rules
          -fcx-limited-range
          -fdata-sections  -fdce  -fdelayed-branch
          -fdelete-null-pointer-checks  -fdevirtualize  -fdevirtualize-speculatively
          -fdevirtualize-at-ltrans  -fdse
          -fearly-inlining  -fipa-sra  -fexpensive-optimizations  -ffat-lto-objects
          -ffast-math  -ffinite-math-only  -ffloat-store  -fexcess-precision=<var>style</var>
          -fforward-propagate  -ffp-contract=<var>style</var>  -ffunction-sections
          -fgcse  -fgcse-after-reload  -fgcse-las  -fgcse-lm  -fgraphite-identity
          -fgcse-sm  -fhoist-adjacent-loads  -fif-conversion
          -fif-conversion2  -findirect-inlining
          -finline-functions  -finline-functions-called-once  -finline-limit=<var>n</var>
          -finline-small-functions  -fipa-cp  -fipa-cp-clone
          -fipa-bit-cp -fipa-vrp
          -fipa-pta  -fipa-profile  -fipa-pure-const  -fipa-reference  -fipa-icf
          -fira-algorithm=<var>algorithm</var>
          -fira-region=<var>region</var>  -fira-hoist-pressure
          -fira-loop-pressure  -fno-ira-share-save-slots
          -fno-ira-share-spill-slots
          -fisolate-erroneous-paths-dereference  -fisolate-erroneous-paths-attribute
          -fivopts  -fkeep-inline-functions  -fkeep-static-functions
          -fkeep-static-consts  -flimit-function-alignment  -flive-range-shrinkage
          -floop-block  -floop-interchange  -floop-strip-mine
          -floop-unroll-and-jam  -floop-nest-optimize
          -floop-parallelize-all  -flra-remat  -flto  -flto-compression-level
          -flto-partition=<var>alg</var>  -fmerge-all-constants
          -fmerge-constants  -fmodulo-sched  -fmodulo-sched-allow-regmoves
          -fmove-loop-invariants  -fno-branch-count-reg
          -fno-defer-pop  -fno-fp-int-builtin-inexact  -fno-function-cse
          -fno-guess-branch-probability  -fno-inline  -fno-math-errno  -fno-peephole
          -fno-peephole2  -fno-printf-return-value  -fno-sched-interblock
          -fno-sched-spec  -fno-signed-zeros
          -fno-toplevel-reorder  -fno-trapping-math  -fno-zero-initialized-in-bss
          -fomit-frame-pointer  -foptimize-sibling-calls
          -fpartial-inlining  -fpeel-loops  -fpredictive-commoning
          -fprefetch-loop-arrays
          -fprofile-correction
          -fprofile-use  -fprofile-use=<var>path</var>  -fprofile-values
          -fprofile-reorder-functions
          -freciprocal-math  -free  -frename-registers  -freorder-blocks
          -freorder-blocks-algorithm=<var>algorithm</var>
          -freorder-blocks-and-partition  -freorder-functions
          -frerun-cse-after-loop  -freschedule-modulo-scheduled-loops
          -frounding-math  -fsched2-use-superblocks  -fsched-pressure
          -fsched-spec-load  -fsched-spec-load-dangerous
          -fsched-stalled-insns-dep[=<var>n</var>]  -fsched-stalled-insns[=<var>n</var>]
          -fsched-group-heuristic  -fsched-critical-path-heuristic
          -fsched-spec-insn-heuristic  -fsched-rank-heuristic
          -fsched-last-insn-heuristic  -fsched-dep-count-heuristic
          -fschedule-fusion
          -fschedule-insns  -fschedule-insns2  -fsection-anchors
          -fselective-scheduling  -fselective-scheduling2
          -fsel-sched-pipelining  -fsel-sched-pipelining-outer-loops
          -fsemantic-interposition  -fshrink-wrap  -fshrink-wrap-separate
          -fsignaling-nans
          -fsingle-precision-constant  -fsplit-ivs-in-unroller  -fsplit-loops
          -fsplit-paths
          -fsplit-wide-types  -fssa-backprop  -fssa-phiopt
          -fstdarg-opt  -fstore-merging  -fstrict-aliasing
          -fthread-jumps  -ftracer  -ftree-bit-ccp
          -ftree-builtin-call-dce  -ftree-ccp  -ftree-ch
          -ftree-coalesce-vars  -ftree-copy-prop  -ftree-dce  -ftree-dominator-opts
          -ftree-dse  -ftree-forwprop  -ftree-fre  -fcode-hoisting
          -ftree-loop-if-convert  -ftree-loop-im
          -ftree-phiprop  -ftree-loop-distribution  -ftree-loop-distribute-patterns
          -ftree-loop-ivcanon  -ftree-loop-linear  -ftree-loop-optimize
          -ftree-loop-vectorize
          -ftree-parallelize-loops=<var>n</var>  -ftree-pre  -ftree-partial-pre  -ftree-pta
          -ftree-reassoc  -ftree-sink  -ftree-slsr  -ftree-sra
          -ftree-switch-conversion  -ftree-tail-merge
          -ftree-ter  -ftree-vectorize  -ftree-vrp  -funconstrained-commons
          -funit-at-a-time  -funroll-all-loops  -funroll-loops
          -funsafe-math-optimizations  -funswitch-loops
          -fipa-ra  -fvariable-expansion-in-unroller  -fvect-cost-model  -fvpt
          -fweb  -fwhole-program  -fwpa  -fuse-linker-plugin
          --param <var>name</var>=<var>value</var>
          -O  -O0  -O1  -O2  -O3  -Os  -Ofast  -Og

Program Instrumentation Options
See Program Instrumentation Options.

          -p  -pg  -fprofile-arcs  --coverage  -ftest-coverage
          -fprofile-abs-path
          -fprofile-dir=<var>path</var>  -fprofile-generate  -fprofile-generate=<var>path</var>
          -fsanitize=<var>style</var>  -fsanitize-recover  -fsanitize-recover=<var>style</var>
          -fasan-shadow-offset=<var>number</var>  -fsanitize-sections=<var>s1</var>,<var>s2</var>,...
          -fsanitize-undefined-trap-on-error  -fbounds-check
          -fcheck-pointer-bounds  -fchkp-check-incomplete-type
          -fchkp-first-field-has-own-bounds  -fchkp-narrow-bounds
          -fchkp-narrow-to-innermost-array  -fchkp-optimize
          -fchkp-use-fast-string-functions  -fchkp-use-nochk-string-functions
          -fchkp-use-static-bounds  -fchkp-use-static-const-bounds
          -fchkp-treat-zero-dynamic-size-as-infinite  -fchkp-check-read
          -fchkp-check-read  -fchkp-check-write  -fchkp-store-bounds
          -fchkp-instrument-calls  -fchkp-instrument-marked-only
          -fchkp-use-wrappers  -fchkp-flexible-struct-trailing-arrays
          -fcf-protection=[full|branch|return|none]
          -fstack-protector  -fstack-protector-all  -fstack-protector-strong
          -fstack-protector-explicit  -fstack-check
          -fstack-limit-register=<var>reg</var>  -fstack-limit-symbol=<var>sym</var>
          -fno-stack-limit  -fsplit-stack
          -fvtable-verify=[std|preinit|none]
          -fvtv-counts  -fvtv-debug
          -finstrument-functions
          -finstrument-functions-exclude-function-list=<var>sym</var>,<var>sym</var>,...
          -finstrument-functions-exclude-file-list=<var>file</var>,<var>file</var>,...

Preprocessor Options
See Options Controlling the Preprocessor.

          -A<var>question</var>=<var>answer</var>
          -A-<var>question</var>[=<var>answer</var>]
          -C  -CC  -D<var>macro</var>[=<var>defn</var>]
          -dD  -dI  -dM  -dN  -dU
          -fdebug-cpp  -fdirectives-only  -fdollars-in-identifiers
          -fexec-charset=<var>charset</var>  -fextended-identifiers
          -finput-charset=<var>charset</var> -fmacro-prefix-map=<var>old</var>=<var>new</var>
          -fno-canonical-system-headers  -fpch-deps  -fpch-preprocess
          -fpreprocessed -ftabstop=<var>width</var>  -ftrack-macro-expansion
          -fwide-exec-charset=<var>charset</var>  -fworking-directory
          -H  -imacros <var>file</var>  -include <var>file</var>
          -M  -MD  -MF  -MG  -MM  -MMD  -MP  -MQ  -MT
          -no-integrated-cpp  -P  -pthread  -remap
          -traditional  -traditional-cpp  -trigraphs
          -U<var>macro</var>  -undef
          -Wp,<var>option</var>  -Xpreprocessor <var>option</var>

Assembler Options
See Passing Options to the Assembler.

          -Wa,<var>option</var>  -Xassembler <var>option</var>

Linker Options
See Options for Linking.

          <var>object-file-name</var>  -fuse-ld=<var>linker</var>  -l<var>library</var>
          -nostartfiles  -nodefaultlibs  -nostdlib  -pie  -pthread  -rdynamic
          -s  -static -static-pie -static-libgcc  -static-libstdc++
          -static-libasan  -static-libtsan  -static-liblsan  -static-libubsan
          -static-libmpx  -static-libmpxwrappers
          -shared  -shared-libgcc  -symbolic
          -T <var>script</var>  -Wl,<var>option</var>  -Xlinker <var>option</var>
          -u <var>symbol</var>  -z <var>keyword</var>

Directory Options
See Options for Directory Search.

          -B<var>prefix</var>  -I<var>dir</var>  -I-
          -idirafter <var>dir</var>
          -imacros <var>file</var>  -imultilib <var>dir</var>
          -iplugindir=<var>dir</var>  -iprefix <var>file</var>
          -iquote <var>dir</var>  -isysroot <var>dir</var>  -isystem <var>dir</var>
          -iwithprefix <var>dir</var>  -iwithprefixbefore <var>dir</var>
          -L<var>dir</var>  -no-canonical-prefixes  --no-sysroot-suffix
          -nostdinc  -nostdinc++  --sysroot=<var>dir</var>

Code Generation Options
See Options for Code Generation Conventions.

          -fcall-saved-<var>reg</var>  -fcall-used-<var>reg</var>
          -ffixed-<var>reg</var>  -fexceptions
          -fnon-call-exceptions  -fdelete-dead-exceptions  -funwind-tables
          -fasynchronous-unwind-tables
          -fno-gnu-unique
          -finhibit-size-directive  -fno-common  -fno-ident
          -fpcc-struct-return  -fpic  -fPIC  -fpie  -fPIE  -fno-plt
          -fno-jump-tables
          -frecord-gcc-switches
          -freg-struct-return  -fshort-enums  -fshort-wchar
          -fverbose-asm  -fpack-struct[=<var>n</var>]
          -fleading-underscore  -ftls-model=<var>model</var>
          -fstack-reuse=<var>reuse_level</var>
          -ftrampolines  -ftrapv  -fwrapv
          -fvisibility=[default|internal|hidden|protected]
          -fstrict-volatile-bitfields  -fsync-libcalls

Developer Options
See GCC Developer Options.

          -d<var>letters</var>  -dumpspecs  -dumpmachine  -dumpversion
          -dumpfullversion  -fchecking  -fchecking=<var>n</var>  -fdbg-cnt-list
          -fdbg-cnt=<var>counter-value-list</var>
          -fdisable-ipa-<var>pass_name</var>
          -fdisable-rtl-<var>pass_name</var>
          -fdisable-rtl-<var>pass-name</var>=<var>range-list</var>
          -fdisable-tree-<var>pass_name</var>
          -fdisable-tree-<var>pass-name</var>=<var>range-list</var>
          -fdump-noaddr  -fdump-unnumbered  -fdump-unnumbered-links
          -fdump-class-hierarchy[-<var>n</var>]
          -fdump-final-insns[=<var>file</var>]
          -fdump-ipa-all  -fdump-ipa-cgraph  -fdump-ipa-inline
          -fdump-lang-all
          -fdump-lang-<var>switch</var>
          -fdump-lang-<var>switch</var>-<var>options</var>
          -fdump-lang-<var>switch</var>-<var>options</var>=<var>filename</var>
          -fdump-passes
          -fdump-rtl-<var>pass</var>  -fdump-rtl-<var>pass</var>=<var>filename</var>
          -fdump-statistics
          -fdump-tree-all
          -fdump-tree-<var>switch</var>
          -fdump-tree-<var>switch</var>-<var>options</var>
          -fdump-tree-<var>switch</var>-<var>options</var>=<var>filename</var>
          -fcompare-debug[=<var>opts</var>]  -fcompare-debug-second
          -fenable-<var>kind</var>-<var>pass</var>
          -fenable-<var>kind</var>-<var>pass</var>=<var>range-list</var>
          -fira-verbose=<var>n</var>
          -flto-report  -flto-report-wpa  -fmem-report-wpa
          -fmem-report  -fpre-ipa-mem-report  -fpost-ipa-mem-report
          -fopt-info  -fopt-info-<var>options</var>[=<var>file</var>]
          -fprofile-report
          -frandom-seed=<var>string</var>  -fsched-verbose=<var>n</var>
          -fsel-sched-verbose  -fsel-sched-dump-cfg  -fsel-sched-pipelining-verbose
          -fstats  -fstack-usage  -ftime-report  -ftime-report-details
          -fvar-tracking-assignments-toggle  -gtoggle
          -print-file-name=<var>library</var>  -print-libgcc-file-name
          -print-multi-directory  -print-multi-lib  -print-multi-os-directory
          -print-prog-name=<var>program</var>  -print-search-dirs  -Q
          -print-sysroot  -print-sysroot-headers-suffix
          -save-temps  -save-temps=cwd  -save-temps=obj  -time[=<var>file</var>]

Machine-Dependent Options
See Machine-Dependent Options.

AArch64 Options

          -mabi=<var>name</var>  -mbig-endian  -mlittle-endian
          -mgeneral-regs-only
          -mcmodel=tiny  -mcmodel=small  -mcmodel=large
          -mstrict-align
          -momit-leaf-frame-pointer
          -mtls-dialect=desc  -mtls-dialect=traditional
          -mtls-size=<var>size</var>
          -mfix-cortex-a53-835769  -mfix-cortex-a53-843419
          -mlow-precision-recip-sqrt  -mlow-precision-sqrt  -mlow-precision-div
          -mpc-relative-literal-loads
          -msign-return-address=<var>scope</var>
          -march=<var>name</var>  -mcpu=<var>name</var>  -mtune=<var>name</var>
          -moverride=<var>string</var>  -mverbose-cost-dump

Adapteva Epiphany Options

          -mhalf-reg-file  -mprefer-short-insn-regs
          -mbranch-cost=<var>num</var>  -mcmove  -mnops=<var>num</var>  -msoft-cmpsf
          -msplit-lohi  -mpost-inc  -mpost-modify  -mstack-offset=<var>num</var>
          -mround-nearest  -mlong-calls  -mshort-calls  -msmall16
          -mfp-mode=<var>mode</var>  -mvect-double  -max-vect-align=<var>num</var>
          -msplit-vecmove-early  -m1reg-<var>reg</var>

ARC Options

          -mbarrel-shifter -mjli-always
          -mcpu=<var>cpu</var>  -mA6  -mARC600  -mA7  -mARC700
          -mdpfp  -mdpfp-compact  -mdpfp-fast  -mno-dpfp-lrsr
          -mea  -mno-mpy  -mmul32x16  -mmul64  -matomic
          -mnorm  -mspfp  -mspfp-compact  -mspfp-fast  -msimd  -msoft-float  -mswap
          -mcrc  -mdsp-packa  -mdvbf  -mlock  -mmac-d16  -mmac-24  -mrtsc  -mswape
          -mtelephony  -mxy  -misize  -mannotate-align  -marclinux  -marclinux_prof
          -mlong-calls  -mmedium-calls  -msdata -mirq-ctrl-saved
          -mrgf-banked-regs -mlpc-width=<var>width</var> -G <var>num</var>
          -mvolatile-cache  -mtp-regno=<var>regno</var>
          -malign-call  -mauto-modify-reg  -mbbit-peephole  -mno-brcc
          -mcase-vector-pcrel  -mcompact-casesi  -mno-cond-exec  -mearly-cbranchsi
          -mexpand-adddi  -mindexed-loads  -mlra  -mlra-priority-none
          -mlra-priority-compact mlra-priority-noncompact  -mno-millicode
          -mmixed-code  -mq-class  -mRcq  -mRcw  -msize-level=<var>level</var>
          -mtune=<var>cpu</var>  -mmultcost=<var>num</var>
          -munalign-prob-threshold=<var>probability</var>  -mmpy-option=<var>multo</var>
          -mdiv-rem  -mcode-density  -mll64  -mfpu=<var>fpu</var> -mrf16

ARM Options

          -mapcs-frame  -mno-apcs-frame
          -mabi=<var>name</var>
          -mapcs-stack-check  -mno-apcs-stack-check
          -mapcs-reentrant  -mno-apcs-reentrant
          -msched-prolog  -mno-sched-prolog
          -mlittle-endian  -mbig-endian
          -mbe8 -mbe32
          -mfloat-abi=<var>name</var>
          -mfp16-format=<var>name</var>
          -mthumb-interwork  -mno-thumb-interwork
          -mcpu=<var>name</var>  -march=<var>name</var>  -mfpu=<var>name</var>
          -mtune=<var>name</var>  -mprint-tune-info
          -mstructure-size-boundary=<var>n</var>
          -mabort-on-noreturn
          -mlong-calls  -mno-long-calls
          -msingle-pic-base  -mno-single-pic-base
          -mpic-register=<var>reg</var>
          -mnop-fun-dllimport
          -mpoke-function-name
          -mthumb  -marm  -mflip-thumb
          -mtpcs-frame  -mtpcs-leaf-frame
          -mcaller-super-interworking  -mcallee-super-interworking
          -mtp=<var>name</var>  -mtls-dialect=<var>dialect</var>
          -mword-relocations
          -mfix-cortex-m3-ldrd
          -munaligned-access
          -mneon-for-64bits
          -mslow-flash-data
          -masm-syntax-unified
          -mrestrict-it
          -mverbose-cost-dump
          -mpure-code
          -mcmse

AVR Options

          -mmcu=<var>mcu</var>  -mabsdata  -maccumulate-args
          -mbranch-cost=<var>cost</var>
          -mcall-prologues  -mgas-isr-prologues  -mint8
          -mn_flash=<var>size</var>  -mno-interrupts
          -mmain-is-OS_task -mrelax  -mrmw  -mstrict-X  -mtiny-stack
          -mfract-convert-truncate
          -mshort-calls  -nodevicelib
          -Waddr-space-convert  -Wmisspelled-isr

Blackfin Options

          -mcpu=<var>cpu</var>[-<var>sirevision</var>]
          -msim  -momit-leaf-frame-pointer  -mno-omit-leaf-frame-pointer
          -mspecld-anomaly  -mno-specld-anomaly  -mcsync-anomaly  -mno-csync-anomaly
          -mlow-64k  -mno-low64k  -mstack-check-l1  -mid-shared-library
          -mno-id-shared-library  -mshared-library-id=<var>n</var>
          -mleaf-id-shared-library  -mno-leaf-id-shared-library
          -msep-data  -mno-sep-data  -mlong-calls  -mno-long-calls
          -mfast-fp  -minline-plt  -mmulticore  -mcorea  -mcoreb  -msdram
          -micplb

C6X Options

          -mbig-endian  -mlittle-endian  -march=<var>cpu</var>
          -msim  -msdata=<var>sdata-type</var>

CRIS Options

          -mcpu=<var>cpu</var>  -march=<var>cpu</var>  -mtune=<var>cpu</var>
          -mmax-stack-frame=<var>n</var>  -melinux-stacksize=<var>n</var>
          -metrax4  -metrax100  -mpdebug  -mcc-init  -mno-side-effects
          -mstack-align  -mdata-align  -mconst-align
          -m32-bit  -m16-bit  -m8-bit  -mno-prologue-epilogue  -mno-gotplt
          -melf  -maout  -melinux  -mlinux  -sim  -sim2
          -mmul-bug-workaround  -mno-mul-bug-workaround

CR16 Options

          -mmac
          -mcr16cplus  -mcr16c
          -msim  -mint32  -mbit-ops
          -mdata-model=<var>model</var>

Darwin Options

          -all_load  -allowable_client  -arch  -arch_errors_fatal
          -arch_only  -bind_at_load  -bundle  -bundle_loader
          -client_name  -compatibility_version  -current_version
          -dead_strip
          -dependency-file  -dylib_file  -dylinker_install_name
          -dynamic  -dynamiclib  -exported_symbols_list
          -filelist  -flat_namespace  -force_cpusubtype_ALL
          -force_flat_namespace  -headerpad_max_install_names
          -iframework
          -image_base  -init  -install_name  -keep_private_externs
          -multi_module  -multiply_defined  -multiply_defined_unused
          -noall_load   -no_dead_strip_inits_and_terms
          -nofixprebinding  -nomultidefs  -noprebind  -noseglinkedit
          -pagezero_size  -prebind  -prebind_all_twolevel_modules
          -private_bundle  -read_only_relocs  -sectalign
          -sectobjectsymbols  -whyload  -seg1addr
          -sectcreate  -sectobjectsymbols  -sectorder
          -segaddr  -segs_read_only_addr  -segs_read_write_addr
          -seg_addr_table  -seg_addr_table_filename  -seglinkedit
          -segprot  -segs_read_only_addr  -segs_read_write_addr
          -single_module  -static  -sub_library  -sub_umbrella
          -twolevel_namespace  -umbrella  -undefined
          -unexported_symbols_list  -weak_reference_mismatches
          -whatsloaded  -F  -gused  -gfull  -mmacosx-version-min=<var>version</var>
          -mkernel  -mone-byte-bool

DEC Alpha Options

          -mno-fp-regs  -msoft-float
          -mieee  -mieee-with-inexact  -mieee-conformant
          -mfp-trap-mode=<var>mode</var>  -mfp-rounding-mode=<var>mode</var>
          -mtrap-precision=<var>mode</var>  -mbuild-constants
          -mcpu=<var>cpu-type</var>  -mtune=<var>cpu-type</var>
          -mbwx  -mmax  -mfix  -mcix
          -mfloat-vax  -mfloat-ieee
          -mexplicit-relocs  -msmall-data  -mlarge-data
          -msmall-text  -mlarge-text
          -mmemory-latency=<var>time</var>

FR30 Options

          -msmall-model  -mno-lsim

FT32 Options

          -msim  -mlra  -mnodiv  -mft32b  -mcompress  -mnopm

FRV Options

          -mgpr-32  -mgpr-64  -mfpr-32  -mfpr-64
          -mhard-float  -msoft-float
          -malloc-cc  -mfixed-cc  -mdword  -mno-dword
          -mdouble  -mno-double
          -mmedia  -mno-media  -mmuladd  -mno-muladd
          -mfdpic  -minline-plt  -mgprel-ro  -multilib-library-pic
          -mlinked-fp  -mlong-calls  -malign-labels
          -mlibrary-pic  -macc-4  -macc-8
          -mpack  -mno-pack  -mno-eflags  -mcond-move  -mno-cond-move
          -moptimize-membar  -mno-optimize-membar
          -mscc  -mno-scc  -mcond-exec  -mno-cond-exec
          -mvliw-branch  -mno-vliw-branch
          -mmulti-cond-exec  -mno-multi-cond-exec  -mnested-cond-exec
          -mno-nested-cond-exec  -mtomcat-stats
          -mTLS  -mtls
          -mcpu=<var>cpu</var>

GNU/Linux Options

          -mglibc  -muclibc  -mmusl  -mbionic  -mandroid
          -tno-android-cc  -tno-android-ld

H8/300 Options

          -mrelax  -mh  -ms  -mn  -mexr  -mno-exr  -mint32  -malign-300

HPPA Options

          -march=<var>architecture-type</var>
          -mcaller-copies  -mdisable-fpregs  -mdisable-indexing
          -mfast-indirect-calls  -mgas  -mgnu-ld   -mhp-ld
          -mfixed-range=<var>register-range</var>
          -mjump-in-delay  -mlinker-opt  -mlong-calls
          -mlong-load-store  -mno-disable-fpregs
          -mno-disable-indexing  -mno-fast-indirect-calls  -mno-gas
          -mno-jump-in-delay  -mno-long-load-store
          -mno-portable-runtime  -mno-soft-float
          -mno-space-regs  -msoft-float  -mpa-risc-1-0
          -mpa-risc-1-1  -mpa-risc-2-0  -mportable-runtime
          -mschedule=<var>cpu-type</var>  -mspace-regs  -msio  -mwsio
          -munix=<var>unix-std</var>  -nolibdld  -static  -threads

IA-64 Options

          -mbig-endian  -mlittle-endian  -mgnu-as  -mgnu-ld  -mno-pic
          -mvolatile-asm-stop  -mregister-names  -msdata  -mno-sdata
          -mconstant-gp  -mauto-pic  -mfused-madd
          -minline-float-divide-min-latency
          -minline-float-divide-max-throughput
          -mno-inline-float-divide
          -minline-int-divide-min-latency
          -minline-int-divide-max-throughput
          -mno-inline-int-divide
          -minline-sqrt-min-latency  -minline-sqrt-max-throughput
          -mno-inline-sqrt
          -mdwarf2-asm  -mearly-stop-bits
          -mfixed-range=<var>register-range</var>  -mtls-size=<var>tls-size</var>
          -mtune=<var>cpu-type</var>  -milp32  -mlp64
          -msched-br-data-spec  -msched-ar-data-spec  -msched-control-spec
          -msched-br-in-data-spec  -msched-ar-in-data-spec  -msched-in-control-spec
          -msched-spec-ldc  -msched-spec-control-ldc
          -msched-prefer-non-data-spec-insns  -msched-prefer-non-control-spec-insns
          -msched-stop-bits-after-every-cycle  -msched-count-spec-in-critical-path
          -msel-sched-dont-check-control-spec  -msched-fp-mem-deps-zero-cost
          -msched-max-memory-insns-hard-limit  -msched-max-memory-insns=<var>max-insns</var>

LM32 Options

          -mbarrel-shift-enabled  -mdivide-enabled  -mmultiply-enabled
          -msign-extend-enabled  -muser-enabled

M32R/D Options

          -m32r2  -m32rx  -m32r
          -mdebug
          -malign-loops  -mno-align-loops
          -missue-rate=<var>number</var>
          -mbranch-cost=<var>number</var>
          -mmodel=<var>code-size-model-type</var>
          -msdata=<var>sdata-type</var>
          -mno-flush-func  -mflush-func=<var>name</var>
          -mno-flush-trap  -mflush-trap=<var>number</var>
          -G <var>num</var>

M32C Options

          -mcpu=<var>cpu</var>  -msim  -memregs=<var>number</var>

M680x0 Options

          -march=<var>arch</var>  -mcpu=<var>cpu</var>  -mtune=<var>tune</var>
          -m68000  -m68020  -m68020-40  -m68020-60  -m68030  -m68040
          -m68060  -mcpu32  -m5200  -m5206e  -m528x  -m5307  -m5407
          -mcfv4e  -mbitfield  -mno-bitfield  -mc68000  -mc68020
          -mnobitfield  -mrtd  -mno-rtd  -mdiv  -mno-div  -mshort
          -mno-short  -mhard-float  -m68881  -msoft-float  -mpcrel
          -malign-int  -mstrict-align  -msep-data  -mno-sep-data
          -mshared-library-id=n  -mid-shared-library  -mno-id-shared-library
          -mxgot  -mno-xgot  -mlong-jump-table-offsets

MCore Options

          -mhardlit  -mno-hardlit  -mdiv  -mno-div  -mrelax-immediates
          -mno-relax-immediates  -mwide-bitfields  -mno-wide-bitfields
          -m4byte-functions  -mno-4byte-functions  -mcallgraph-data
          -mno-callgraph-data  -mslow-bytes  -mno-slow-bytes  -mno-lsim
          -mlittle-endian  -mbig-endian  -m210  -m340  -mstack-increment

MeP Options

          -mabsdiff  -mall-opts  -maverage  -mbased=<var>n</var>  -mbitops
          -mc=<var>n</var>  -mclip  -mconfig=<var>name</var>  -mcop  -mcop32  -mcop64  -mivc2
          -mdc  -mdiv  -meb  -mel  -mio-volatile  -ml  -mleadz  -mm  -mminmax
          -mmult  -mno-opts  -mrepeat  -ms  -msatur  -msdram  -msim  -msimnovec  -mtf
          -mtiny=<var>n</var>

MicroBlaze Options

          -msoft-float  -mhard-float  -msmall-divides  -mcpu=<var>cpu</var>
          -mmemcpy  -mxl-soft-mul  -mxl-soft-div  -mxl-barrel-shift
          -mxl-pattern-compare  -mxl-stack-check  -mxl-gp-opt  -mno-clearbss
          -mxl-multiply-high  -mxl-float-convert  -mxl-float-sqrt
          -mbig-endian  -mlittle-endian  -mxl-reorder  -mxl-mode-<var>app-model</var>

MIPS Options

          -EL  -EB  -march=<var>arch</var>  -mtune=<var>arch</var>
          -mips1  -mips2  -mips3  -mips4  -mips32  -mips32r2  -mips32r3  -mips32r5
          -mips32r6  -mips64  -mips64r2  -mips64r3  -mips64r5  -mips64r6
          -mips16  -mno-mips16  -mflip-mips16
          -minterlink-compressed  -mno-interlink-compressed
          -minterlink-mips16  -mno-interlink-mips16
          -mabi=<var>abi</var>  -mabicalls  -mno-abicalls
          -mshared  -mno-shared  -mplt  -mno-plt  -mxgot  -mno-xgot
          -mgp32  -mgp64  -mfp32  -mfpxx  -mfp64  -mhard-float  -msoft-float
          -mno-float  -msingle-float  -mdouble-float
          -modd-spreg  -mno-odd-spreg
          -mabs=<var>mode</var>  -mnan=<var>encoding</var>
          -mdsp  -mno-dsp  -mdspr2  -mno-dspr2
          -mmcu  -mmno-mcu
          -meva  -mno-eva
          -mvirt  -mno-virt
          -mxpa  -mno-xpa
          -mmicromips  -mno-micromips
          -mmsa  -mno-msa
          -mfpu=<var>fpu-type</var>
          -msmartmips  -mno-smartmips
          -mpaired-single  -mno-paired-single  -mdmx  -mno-mdmx
          -mips3d  -mno-mips3d  -mmt  -mno-mt  -mllsc  -mno-llsc
          -mlong64  -mlong32  -msym32  -mno-sym32
          -G<var>num</var>  -mlocal-sdata  -mno-local-sdata
          -mextern-sdata  -mno-extern-sdata  -mgpopt  -mno-gopt
          -membedded-data  -mno-embedded-data
          -muninit-const-in-rodata  -mno-uninit-const-in-rodata
          -mcode-readable=<var>setting</var>
          -msplit-addresses  -mno-split-addresses
          -mexplicit-relocs  -mno-explicit-relocs
          -mcheck-zero-division  -mno-check-zero-division
          -mdivide-traps  -mdivide-breaks
          -mload-store-pairs  -mno-load-store-pairs
          -mmemcpy  -mno-memcpy  -mlong-calls  -mno-long-calls
          -mmad  -mno-mad  -mimadd  -mno-imadd  -mfused-madd  -mno-fused-madd  -nocpp
          -mfix-24k  -mno-fix-24k
          -mfix-r4000  -mno-fix-r4000  -mfix-r4400  -mno-fix-r4400
          -mfix-r10000  -mno-fix-r10000  -mfix-rm7000  -mno-fix-rm7000
          -mfix-vr4120  -mno-fix-vr4120
          -mfix-vr4130  -mno-fix-vr4130  -mfix-sb1  -mno-fix-sb1
          -mflush-func=<var>func</var>  -mno-flush-func
          -mbranch-cost=<var>num</var>  -mbranch-likely  -mno-branch-likely
          -mcompact-branches=<var>policy</var>
          -mfp-exceptions  -mno-fp-exceptions
          -mvr4130-align  -mno-vr4130-align  -msynci  -mno-synci
          -mlxc1-sxc1 -mno-lxc1-sxc1 -mmadd4 -mno-madd4
          -mrelax-pic-calls  -mno-relax-pic-calls  -mmcount-ra-address
          -mframe-header-opt  -mno-frame-header-opt

MMIX Options

          -mlibfuncs  -mno-libfuncs  -mepsilon  -mno-epsilon  -mabi=gnu
          -mabi=mmixware  -mzero-extend  -mknuthdiv  -mtoplevel-symbols
          -melf  -mbranch-predict  -mno-branch-predict  -mbase-addresses
          -mno-base-addresses  -msingle-exit  -mno-single-exit

MN10300 Options

          -mmult-bug  -mno-mult-bug
          -mno-am33  -mam33  -mam33-2  -mam34
          -mtune=<var>cpu-type</var>
          -mreturn-pointer-on-d0
          -mno-crt0  -mrelax  -mliw  -msetlb

Moxie Options

          -meb  -mel  -mmul.x  -mno-crt0

MSP430 Options

          -msim  -masm-hex  -mmcu=  -mcpu=  -mlarge  -msmall  -mrelax
          -mwarn-mcu
          -mcode-region=  -mdata-region=
          -msilicon-errata=  -msilicon-errata-warn=
          -mhwmult=  -minrt

NDS32 Options

          -mbig-endian  -mlittle-endian
          -mreduced-regs  -mfull-regs
          -mcmov  -mno-cmov
          -mext-perf  -mno-ext-perf
          -mext-perf2  -mno-ext-perf2
          -mext-string  -mno-ext-string
          -mv3push  -mno-v3push
          -m16bit  -mno-16bit
          -misr-vector-size=<var>num</var>
          -mcache-block-size=<var>num</var>
          -march=<var>arch</var>
          -mcmodel=<var>code-model</var>
          -mctor-dtor  -mrelax

Nios II Options

          -G <var>num</var>  -mgpopt=<var>option</var>  -mgpopt  -mno-gpopt
          -mgprel-sec=<var>regexp</var> -mr0rel-sec=<var>regexp</var>
          -mel  -meb
          -mno-bypass-cache  -mbypass-cache
          -mno-cache-volatile  -mcache-volatile
          -mno-fast-sw-div  -mfast-sw-div
          -mhw-mul  -mno-hw-mul  -mhw-mulx  -mno-hw-mulx  -mno-hw-div  -mhw-div
          -mcustom-<var>insn</var>=<var>N</var>  -mno-custom-<var>insn</var>
          -mcustom-fpu-cfg=<var>name</var>
          -mhal  -msmallc  -msys-crt0=<var>name</var>  -msys-lib=<var>name</var>
          -march=<var>arch</var>  -mbmx  -mno-bmx  -mcdx  -mno-cdx

Nvidia PTX Options

          -m32  -m64  -mmainkernel  -moptimize

PDP-11 Options

          -mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10
          -mbcopy  -mbcopy-builtin  -mint32  -mno-int16
          -mint16  -mno-int32  -mfloat32  -mno-float64
          -mfloat64  -mno-float32  -mabshi  -mno-abshi
          -mbranch-expensive  -mbranch-cheap
          -munix-asm  -mdec-asm

picoChip Options

          -mae=<var>ae_type</var>  -mvliw-lookahead=<var>N</var>
          -msymbol-as-address  -mno-inefficient-warnings

PowerPC Options
See RS/6000 and PowerPC Options.

PowerPC SPE Options

          -mcpu=<var>cpu-type</var>
          -mtune=<var>cpu-type</var>
          -mmfcrf  -mno-mfcrf  -mpopcntb  -mno-popcntb
          -mfull-toc   -mminimal-toc  -mno-fp-in-toc  -mno-sum-in-toc
          -m32  -mxl-compat  -mno-xl-compat
          -malign-power  -malign-natural
          -msoft-float  -mhard-float  -mmultiple  -mno-multiple
          -msingle-float  -mdouble-float
          -mupdate  -mno-update
          -mavoid-indexed-addresses  -mno-avoid-indexed-addresses
          -mstrict-align  -mno-strict-align  -mrelocatable
          -mno-relocatable  -mrelocatable-lib  -mno-relocatable-lib
          -mtoc  -mno-toc  -mlittle  -mlittle-endian  -mbig  -mbig-endian
          -msingle-pic-base
          -mprioritize-restricted-insns=<var>priority</var>
          -msched-costly-dep=<var>dependence_type</var>
          -minsert-sched-nops=<var>scheme</var>
          -mcall-sysv  -mcall-netbsd
          -maix-struct-return  -msvr4-struct-return
          -mabi=<var>abi-type</var>  -msecure-plt  -mbss-plt
          -mblock-move-inline-limit=<var>num</var>
          -misel  -mno-isel
          -misel=yes  -misel=no
          -mspe  -mno-spe
          -mspe=yes  -mspe=no
          -mfloat-gprs=yes  -mfloat-gprs=no  -mfloat-gprs=single  -mfloat-gprs=double
          -mprototype  -mno-prototype
          -msim  -mmvme  -mads  -myellowknife  -memb  -msdata
          -msdata=<var>opt</var>  -mvxworks  -G <var>num</var>
          -mrecip  -mrecip=<var>opt</var>  -mno-recip  -mrecip-precision
          -mno-recip-precision
          -mpointers-to-nested-functions  -mno-pointers-to-nested-functions
          -msave-toc-indirect  -mno-save-toc-indirect
          -mcompat-align-parm  -mno-compat-align-parm
          -mfloat128  -mno-float128
          -mgnu-attribute  -mno-gnu-attribute
          -mstack-protector-guard=<var>guard</var> -mstack-protector-guard-reg=<var>reg</var>
          -mstack-protector-guard-offset=<var>offset</var>

RISC-V Options

          -mbranch-cost=<var>N-instruction</var>
          -mplt  -mno-plt
          -mabi=<var>ABI-string</var>
          -mfdiv  -mno-fdiv
          -mdiv  -mno-div
          -march=<var>ISA-string</var>
          -mtune=<var>processor-string</var>
          -mpreferred-stack-boundary=<var>num</var>
          -msmall-data-limit=<var>N-bytes</var>
          -msave-restore  -mno-save-restore
          -mstrict-align -mno-strict-align
          -mcmodel=medlow -mcmodel=medany
          -mexplicit-relocs  -mno-explicit-relocs
          -mrelax  -mno-relax
          -mriscv-attribute  -mmo-riscv-attribute
          -malign-data=<var>type</var>

RL78 Options

          -msim  -mmul=none  -mmul=g13  -mmul=g14  -mallregs
          -mcpu=g10  -mcpu=g13  -mcpu=g14  -mg10  -mg13  -mg14
          -m64bit-doubles  -m32bit-doubles  -msave-mduc-in-interrupts

RS/6000 and PowerPC Options

          -mcpu=<var>cpu-type</var>
          -mtune=<var>cpu-type</var>
          -mcmodel=<var>code-model</var>
          -mpowerpc64
          -maltivec  -mno-altivec
          -mpowerpc-gpopt  -mno-powerpc-gpopt
          -mpowerpc-gfxopt  -mno-powerpc-gfxopt
          -mmfcrf  -mno-mfcrf  -mpopcntb  -mno-popcntb  -mpopcntd  -mno-popcntd
          -mfprnd  -mno-fprnd
          -mcmpb  -mno-cmpb  -mmfpgpr  -mno-mfpgpr  -mhard-dfp  -mno-hard-dfp
          -mfull-toc   -mminimal-toc  -mno-fp-in-toc  -mno-sum-in-toc
          -m64  -m32  -mxl-compat  -mno-xl-compat  -mpe
          -malign-power  -malign-natural
          -msoft-float  -mhard-float  -mmultiple  -mno-multiple
          -msingle-float  -mdouble-float  -msimple-fpu
          -mupdate  -mno-update
          -mavoid-indexed-addresses  -mno-avoid-indexed-addresses
          -mfused-madd  -mno-fused-madd  -mbit-align  -mno-bit-align
          -mstrict-align  -mno-strict-align  -mrelocatable
          -mno-relocatable  -mrelocatable-lib  -mno-relocatable-lib
          -mtoc  -mno-toc  -mlittle  -mlittle-endian  -mbig  -mbig-endian
          -mdynamic-no-pic  -maltivec  -mswdiv  -msingle-pic-base
          -mprioritize-restricted-insns=<var>priority</var>
          -msched-costly-dep=<var>dependence_type</var>
          -minsert-sched-nops=<var>scheme</var>
          -mcall-aixdesc  -mcall-eabi  -mcall-freebsd
          -mcall-linux  -mcall-netbsd  -mcall-openbsd
          -mcall-sysv  -mcall-sysv-eabi  -mcall-sysv-noeabi
          -mtraceback=<var>traceback_type</var>
          -maix-struct-return  -msvr4-struct-return
          -mabi=<var>abi-type</var>  -msecure-plt  -mbss-plt
          -mblock-move-inline-limit=<var>num</var>
          -mblock-compare-inline-limit=<var>num</var>
          -mblock-compare-inline-loop-limit=<var>num</var>
          -mstring-compare-inline-limit=<var>num</var>
          -misel  -mno-isel
          -misel=yes  -misel=no
          -mpaired
          -mvrsave  -mno-vrsave
          -mmulhw  -mno-mulhw
          -mdlmzb  -mno-dlmzb
          -mprototype  -mno-prototype
          -msim  -mmvme  -mads  -myellowknife  -memb  -msdata
          -msdata=<var>opt</var>  -mreadonly-in-sdata  -mvxworks  -G <var>num</var>
          -mrecip  -mrecip=<var>opt</var>  -mno-recip  -mrecip-precision
          -mno-recip-precision
          -mveclibabi=<var>type</var>  -mfriz  -mno-friz
          -mpointers-to-nested-functions  -mno-pointers-to-nested-functions
          -msave-toc-indirect  -mno-save-toc-indirect
          -mpower8-fusion  -mno-mpower8-fusion  -mpower8-vector  -mno-power8-vector
          -mcrypto  -mno-crypto  -mhtm  -mno-htm
          -mquad-memory  -mno-quad-memory
          -mquad-memory-atomic  -mno-quad-memory-atomic
          -mcompat-align-parm  -mno-compat-align-parm
          -mfloat128  -mno-float128  -mfloat128-hardware  -mno-float128-hardware
          -mgnu-attribute  -mno-gnu-attribute
          -mstack-protector-guard=<var>guard</var> -mstack-protector-guard-reg=<var>reg</var>
          -mstack-protector-guard-offset=<var>offset</var>

RX Options

          -m64bit-doubles  -m32bit-doubles  -fpu  -nofpu
          -mcpu=
          -mbig-endian-data  -mlittle-endian-data
          -msmall-data
          -msim  -mno-sim
          -mas100-syntax  -mno-as100-syntax
          -mrelax
          -mmax-constant-size=
          -mint-register=
          -mpid
          -mallow-string-insns  -mno-allow-string-insns
          -mjsr
          -mno-warn-multiple-fast-interrupts
          -msave-acc-in-interrupts

S/390 and zSeries Options

          -mtune=<var>cpu-type</var>  -march=<var>cpu-type</var>
          -mhard-float  -msoft-float  -mhard-dfp  -mno-hard-dfp
          -mlong-double-64  -mlong-double-128
          -mbackchain  -mno-backchain  -mpacked-stack  -mno-packed-stack
          -msmall-exec  -mno-small-exec  -mmvcle  -mno-mvcle
          -m64  -m31  -mdebug  -mno-debug  -mesa  -mzarch
          -mhtm  -mvx  -mzvector
          -mtpf-trace  -mno-tpf-trace  -mfused-madd  -mno-fused-madd
          -mwarn-framesize  -mwarn-dynamicstack  -mstack-size  -mstack-guard
          -mhotpatch=<var>halfwords</var>,<var>halfwords</var>

Score Options

          -meb  -mel
          -mnhwloop
          -muls
          -mmac
          -mscore5  -mscore5u  -mscore7  -mscore7d

SH Options

          -m1  -m2  -m2e
          -m2a-nofpu  -m2a-single-only  -m2a-single  -m2a
          -m3  -m3e
          -m4-nofpu  -m4-single-only  -m4-single  -m4
          -m4a-nofpu  -m4a-single-only  -m4a-single  -m4a  -m4al
          -mb  -ml  -mdalign  -mrelax
          -mbigtable  -mfmovd  -mrenesas  -mno-renesas  -mnomacsave
          -mieee  -mno-ieee  -mbitops  -misize  -minline-ic_invalidate  -mpadstruct
          -mprefergot  -musermode  -multcost=<var>number</var>  -mdiv=<var>strategy</var>
          -mdivsi3_libfunc=<var>name</var>  -mfixed-range=<var>register-range</var>
          -maccumulate-outgoing-args
          -matomic-model=<var>atomic-model</var>
          -mbranch-cost=<var>num</var>  -mzdcbranch  -mno-zdcbranch
          -mcbranch-force-delay-slot
          -mfused-madd  -mno-fused-madd  -mfsca  -mno-fsca  -mfsrra  -mno-fsrra
          -mpretend-cmove  -mtas

Solaris 2 Options

          -mclear-hwcap  -mno-clear-hwcap  -mimpure-text  -mno-impure-text
          -pthreads

SPARC Options

          -mcpu=<var>cpu-type</var>
          -mtune=<var>cpu-type</var>
          -mcmodel=<var>code-model</var>
          -mmemory-model=<var>mem-model</var>
          -m32  -m64  -mapp-regs  -mno-app-regs
          -mfaster-structs  -mno-faster-structs  -mflat  -mno-flat
          -mfpu  -mno-fpu  -mhard-float  -msoft-float
          -mhard-quad-float  -msoft-quad-float
          -mstack-bias  -mno-stack-bias
          -mstd-struct-return  -mno-std-struct-return
          -munaligned-doubles  -mno-unaligned-doubles
          -muser-mode  -mno-user-mode
          -mv8plus  -mno-v8plus  -mvis  -mno-vis
          -mvis2  -mno-vis2  -mvis3  -mno-vis3
          -mvis4 -mno-vis4 -mvis4b -mno-vis4b
          -mcbcond  -mno-cbcond  -mfmaf  -mno-fmaf  -mfsmuld  -mno-fsmuld
          -mpopc  -mno-popc  -msubxc  -mno-subxc
          -mfix-at697f  -mfix-ut699  -mfix-ut700  -mfix-gr712rc
          -mlra  -mno-lra

SPU Options

          -mwarn-reloc  -merror-reloc
          -msafe-dma  -munsafe-dma
          -mbranch-hints
          -msmall-mem  -mlarge-mem  -mstdmain
          -mfixed-range=<var>register-range</var>
          -mea32  -mea64
          -maddress-space-conversion  -mno-address-space-conversion
          -mcache-size=<var>cache-size</var>
          -matomic-updates  -mno-atomic-updates

System V Options

          -Qy  -Qn  -YP,<var>paths</var>  -Ym,<var>dir</var>

TILE-Gx Options

          -mcpu=CPU  -m32  -m64  -mbig-endian  -mlittle-endian
          -mcmodel=<var>code-model</var>

TILEPro Options

          -mcpu=<var>cpu</var>  -m32

V850 Options

          -mlong-calls  -mno-long-calls  -mep  -mno-ep
          -mprolog-function  -mno-prolog-function  -mspace
          -mtda=<var>n</var>  -msda=<var>n</var>  -mzda=<var>n</var>
          -mapp-regs  -mno-app-regs
          -mdisable-callt  -mno-disable-callt
          -mv850e2v3  -mv850e2  -mv850e1  -mv850es
          -mv850e  -mv850  -mv850e3v5
          -mloop
          -mrelax
          -mlong-jumps
          -msoft-float
          -mhard-float
          -mgcc-abi
          -mrh850-abi
          -mbig-switch

VAX Options

          -mg  -mgnu  -munix

Visium Options

          -mdebug  -msim  -mfpu  -mno-fpu  -mhard-float  -msoft-float
          -mcpu=<var>cpu-type</var>  -mtune=<var>cpu-type</var>  -msv-mode  -muser-mode

VMS Options

          -mvms-return-codes  -mdebug-main=<var>prefix</var>  -mmalloc64
          -mpointer-size=<var>size</var>

VxWorks Options

          -mrtp  -non-static  -Bstatic  -Bdynamic
          -Xbind-lazy  -Xbind-now

x86 Options

          -mtune=<var>cpu-type</var>  -march=<var>cpu-type</var>
          -mtune-ctrl=<var>feature-list</var>  -mdump-tune-features  -mno-default
          -mfpmath=<var>unit</var>
          -masm=<var>dialect</var>  -mno-fancy-math-387
          -mno-fp-ret-in-387  -m80387  -mhard-float  -msoft-float
          -mno-wide-multiply  -mrtd  -malign-double
          -mpreferred-stack-boundary=<var>num</var>
          -mincoming-stack-boundary=<var>num</var>
          -mcld  -mcx16  -msahf  -mmovbe  -mcrc32
          -mrecip  -mrecip=<var>opt</var>
          -mvzeroupper  -mprefer-avx128 -mprefer-vector-width=<var>opt</var>
          -mmmx  -msse  -msse2  -msse3  -mssse3  -msse4.1  -msse4.2  -msse4  -mavx
          -mavx2  -mavx512f  -mavx512pf  -mavx512er  -mavx512cd  -mavx512vl
          -mavx512bw  -mavx512dq  -mavx512ifma  -mavx512vbmi  -msha  -maes
          -mpclmul  -mfsgsbase  -mrdrnd  -mf16c  -mfma -mpconfig -mwbnoinvd
          -mprefetchwt1  -mclflushopt  -mclwb  -mxsavec  -mxsaves
          -msse4a  -m3dnow  -m3dnowa  -mpopcnt  -mabm  -mbmi  -mtbm  -mfma4  -mxop
          -madx  -mlzcnt  -mbmi2  -mfxsr  -mxsave  -mxsaveopt  -mrtm  -mlwp  -mmpx
          -mmwaitx  -mclzero  -mpku  -mthreads -mgfni  -mvaes
          -mshstk -mforce-indirect-call -mavx512vbmi2
          -mvpclmulqdq -mavx512bitalg -mmovdiri -mmovdir64b -mavx512vpopcntdq
          -mavx5124fmaps  -mavx512vnni  -mavx5124vnniw  -mprfchw  -mrdpid
          -mrdseed  -msgx
          -mms-bitfields  -mno-align-stringops  -minline-all-stringops
          -minline-stringops-dynamically  -mstringop-strategy=<var>alg</var>
          -mmemcpy-strategy=<var>strategy</var>  -mmemset-strategy=<var>strategy</var>
          -mpush-args  -maccumulate-outgoing-args  -m128bit-long-double
          -m96bit-long-double  -mlong-double-64  -mlong-double-80  -mlong-double-128
          -mregparm=<var>num</var>  -msseregparm
          -mveclibabi=<var>type</var>  -mvect8-ret-in-mem
          -mpc32  -mpc64  -mpc80  -mstackrealign
          -momit-leaf-frame-pointer  -mno-red-zone  -mno-tls-direct-seg-refs
          -mcmodel=<var>code-model</var>  -mabi=<var>name</var>  -maddress-mode=<var>mode</var>
          -m32  -m64  -mx32  -m16  -miamcu  -mlarge-data-threshold=<var>num</var>
          -msse2avx  -mfentry  -mrecord-mcount  -mnop-mcount  -m8bit-idiv
          -mavx256-split-unaligned-load  -mavx256-split-unaligned-store
          -malign-data=<var>type</var>  -mstack-protector-guard=<var>guard</var>
          -mstack-protector-guard-reg=<var>reg</var>
          -mstack-protector-guard-offset=<var>offset</var>
          -mstack-protector-guard-symbol=<var>symbol</var> -mmitigate-rop
          -mgeneral-regs-only -mcall-ms2sysv-xlogues
          -mindirect-branch=<var>choice</var> -mfunction-return=<var>choice</var>
          -mindirect-branch-register

x86 Windows Options

          -mconsole  -mcygwin  -mno-cygwin  -mdll
          -mnop-fun-dllimport  -mthread
          -municode  -mwin32  -mwindows  -fno-set-stack-executable

Xstormy16 Options

          -msim

Xtensa Options

          -mconst16  -mno-const16
          -mfused-madd  -mno-fused-madd
          -mforce-no-pic
          -mserialize-volatile  -mno-serialize-volatile
          -mtext-section-literals  -mno-text-section-literals
          -mauto-litpools  -mno-auto-litpools
          -mtarget-align  -mno-target-align
          -mlongcalls  -mno-longcalls

zSeries Options
See S/390 and zSeries Options.


text:
package com.spotify.hacks.psyonspotify;

class Track {
	private String mTrack;
	private String mAlbum;
	private String mArtist;
	private String mUri;

	public Track(String track, String album, String artist,	String uri) {
		mTrack = track;
		mAlbum = album;
		mArtist = artist;
		mUri = uri;
	}

	public String getSpotifyUri() {
		return mUri;
	}

	public String getTrackInfo() {
		return mAlbum + " - " + mArtist;
	}

	public CharSequence getTrackName() {
		return mTrack;
	}

}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- OMG IDL to Erlang Mapping</title>

User's Guide
Reference Manual
Release Notes
PDF
Top
orber
User's Guide
Version 3.8.1

Expand All
Contract All
Chapters

The Orber Application

              Top of chapter

Content Overview

Brief Description of the User's Guide

Introduction to Orber

              Top of chapter

Overview

The Orber Application

              Top of chapter

ORB Kernel and IIOP

The Object Request Broker (ORB)

Internet Inter-Object Protocol (IIOP)

Interface Repository

              Top of chapter

Interface Repository(IFR)

Installing Orber

              Top of chapter

Installation Process

Configuration

Firewall Configuration

Interface Configuration

OMG IDL to Erlang Mapping

              Top of chapter

OMG IDL to Erlang Mapping - Overview

OMG IDL Mapping Elements

Getting Started

Basic OMG IDL Types

Template OMG IDL Types and Complex Declarators

Constructed OMG IDL Types

Scoped Names and Generated Files

Typecode, Identity and Name Access Functions

References to Constants

References to Objects Defined in OMG IDL

Exceptions

Access to Attributes

Invocations of Operations

Implementing the DB Application

Reserved Compiler Names and Keywords

Type Code Representation

CosNaming Service

              Top of chapter

Overview of the CosNaming Service

The Basic Use-cases of the Naming Service

Interoperable Naming Service

How to use security in Orber

              Top of chapter

Security in Orber

Orber Stubs/Skeletons

              Top of chapter

Orber Stubs and Skeletons Description

CORBA System and User Defined Exceptions

              Top of chapter

System Exceptions

User Defined Exceptions

Throwing Exceptions

Catching Exceptions

Orber Interceptors

              Top of chapter

Using Interceptors

Interceptor Example

OrberWeb

              Top of chapter

Using OrberWeb

Starting OrberWeb

Debugging

              Top of chapter

Tools and FAQ

6 OMG IDL to Erlang Mapping

6.1
        OMG IDL to Erlang Mapping - Overview

The purpose of OMG IDL, Interface Definition Language, mapping
      is to act as translator between platforms and languages. An IDL
      specification is supposed to describe data types, object types etc.

CORBA is independent of the programming language used to construct
      clients or implementations. In order to use the ORB, it is
      necessary for programmers to know how to access ORB functionality
      from their programming languages. It translates different IDL constructs
      to  a specific programming language. This chapter
      describes the mapping of OMG IDL constructs to the Erlang programming
      language.

6.2
        OMG IDL Mapping Elements

A complete language mapping will allow the programmer to have
      access to all ORB functionality in a way that is convenient for
      a specified programming language.

All mapping must define the following elements:

All OMG IDL basic and constructed types

References to constants defined in OMG IDL

References to objects defined in OMG IDL

Invocations of operations, including passing of
       parameters and receiving of results

Exceptions, including what happens when an operation
       raises an exception and how the exception parameters are
       accessed

Access to attributes

Signatures for operations defined by the ORB, such as
       dynamic invocation interface, the object adapters etc.

Scopes;
       OMG IDL has several levels of scopes, which are mapped to Erlang's
       two scopes.

6.3
        Getting Started

To begin with, we should decide which type of objects (i.e. servers) we
      need and if two, or more, should export the same functionality. Let us
      assume that we want to create a system for DB (database) access for different
      kind of users. For example, anyone with a valid password may extract
      data, but only a few may update the DB. Usually, an application
      is defined within a module, and all global datatypes are defined
      on the top-level. To begin with we create a module and the interfaces we
      need:

// DB IDL
#ifndef _DB_IDL_
#define _DB_IDL_
// A module is simply a container
module DB {

  // An interface maps to a CORBA::Object.
  interface CommonUser {

  };

  // Inherit the Consumer interface
  interface Administrator : CommonUser {

  };

  interface Access {

  };

};
#endif

Since the Administrator should be able to do the same things as the
      CommonUser, the previous inherits from the latter. The Access
      interface will grant access to the DB.
      Now we are ready to define the functionality and data types we need. But, this
      requires that we know a little bit more about the OMG IDL.

Note

The OMG defines a set of reserved case insensitive key-words, which may
        NOT be used as identifiers (e.g. module name). For more
        information, see
        Reserved Compiler Names and Keywords

6.4
        Basic OMG IDL Types

The OMG IDL mapping is strongly typed and, even if you have a good knowledge
      of CORBA types, it is essential to read carefully the following mapping to
      Erlang types.

The mapping of basic types is straightforward. Note that the
      OMG IDL double type is mapped to an Erlang float which does not
      support the full double value range.

        OMG IDL type
        Erlang type
        Note

        float
        Erlang float

        double
        Erlang float
        value range not supported

        short
        Erlang integer
        -2^15 .. 2^15-1

        unsigned short
        Erlang integer
        0 .. 2^16-1

        long
        Erlang integer
        -2^31 .. 2^31-1

        unsigned long
        Erlang integer
        0 .. 2^32-1

        long long
        Erlang integer
        -2^63 .. 2^63-1

        unsigned long long
        Erlang integer
        0 .. 2^64-1

        char
        Erlang integer
        ISO-8859-1

        wchar
        Erlang integer
        UTF-16 (ISO-10646-1:1993)

        boolean
        Erlang atom
        true/false

        octet
        Erlang integer

        any
        Erlang record
        #any{typecode, value}

        long double
        Not supported

        Object
        Orber object reference
        Internal Representation

        void
        Erlang atom
        ok

Table
        6.1:

        OMG IDL basic types

The any value is written as a record with the field typecode which
      contains the Type Coderepresentation,
      see also the Type Code table,
      and the value field itself.

Functions with return type void will return the atom ok.

6.5
        Template OMG IDL Types and Complex Declarators

Constructed types all have native mappings as shown in the table
      below.

        Type
        IDL code
        Maps to
        Erlang code

        string
        typedef string S;

void op(in S a);
        Erlang string
        ok = op(Obj, "Hello World"),

        wstring
        typedef wstring S;

void op(in S a);
        Erlang list of Integers
        ok = op(Obj, "Hello World"),

        sequence
        typedef sequence <long, 3> S;

void op(in S a);
        Erlang list
        ok = op(Obj, [1, 2, 3]),

        array
        typedef string S[2];

void op(in S a);
        Erlang tuple
        ok = op(Obj, {"one", "two"}),

        fixed
        typedef fixed<3,2> myFixed;

void op(in myFixed a);
        Erlang tuple
        MF = fixed:create(3, 2, 314),

ok = op(Obj, MF),

Table
        6.2:

        OMG IDL Template and Complex Declarators

String/WString Data Types

A string consists of all possible 8-bit quantities except null.
        Most ORB:s uses, including Orber, the character set Latin-1 (ISO-8859-1).
        The wstring type is represented as a list of integers, where
        each integer represents a wide character. In this case Orber uses, as
        most other ORB:s, the UTF-16 (ISO-10646-1:1993) character set.

When defining a a string or wstring they can be of limited length or
        null terminated:

// Null terminated
typedef string myString;
typedef wstring myWString;
// Maximum length 10
typedef string<10> myString10;
typedef wstring<10> myWString10;

If we want to define a char/string or wchar/wstring constant, we can
        use octal (\OOO - one, two or three octal digits),
        hexadecimal (\xHH - one or two hexadecimal digits) and unicode (\uHHHH -
        one, two, three or four hexadecimal digits.) representation as well.
        For example:

const string  SwedensBestSoccerTeam = "\101" "\x49" "\u004B";
const wstring SwedensBestHockeyTeam = L"\101\x49\u004B";
const char  aChar  = '\u004B';
const wchar aWchar = L'\u004C';

Naturally, we can use "Erlang", L"Rocks", 'A'
        and L'A' as well.

Sequence Data Type

A sequence can be defined to be of a maximum length or unbounded, and may
        contain Basic and Template types and scoped names:

typedef sequence <short, 1> aShortSequence;
typedef sequence <long> aLongSequence;
typedef sequence <aLongSequence> anEvenLongerSequence;

Array Data Type

Arrays are multidimensional, fixed-size arrays. The indices is language
        mapping specific, which is why one should not pass them as arguments
        to another ORB.

typedef long myMatrix[2][3];

Fixed Data Type

A Fixed Point literal consists of an integer part (decimal digits),
        decimal point and a fraction part (decimal digits),
        followed by a D or d. Either the integer part or the
        fraction part may be missing; the decimal point may be missing,
        but not d/D. The integer part must be a positive integer less than 32.
        The Fraction part must be a positive integer less than or equal to
        the Integer part.

const fixed myFixed1 = 3.14D;
const fixed myFixed2 = .14D;
const fixed myFixed3 = 0.14D;
const fixed myFixed4 = 3.D;
const fixed myFixed5 = 3D;

It is also possible to use unary (+-) and binary (+-*/) operators:

const fixed myFixed6 = 3D + 0.14D;
const fixed myFixed7 = -3.14D;

The Fixed Point examples above are, so called, anonymous
        definitions. In later CORBA specifications these have been deprecated
        as function parameters or return values. Hence, we strongly recommend that
        you do not use them. Instead, you should use:

typedef fixed<5,3> myFixed53;
const myFixed53 myFixed53constant = 03.140d;
typedef fixed<3,2> myFixed32;
const myFixed32 myFixed32constant = 3.14d;

myFixed53 foo(in myFixed32 MF); // OK
void bar(in fixed<5,3> MF); // Illegal

For more information, see Fixed in
      Orber's Reference Manual.

Now we continue to work on our IDL specification. To begin with, we want
      to limit the size of the logon parameters (Id and password). Since the
      UserID and Password parameters, only will be used when
      invoking operations on the Access interface, we may choose to define
      them within the scope that interface. To keep it simple our DB will contain
      employee information. Hence, as the DB key we choose an integer
      (EmployeeNo).

// DB IDL
#ifndef _DB_IDL_
#define _DB_IDL_
module DB {

  typedef unsigned long EmployeeNo;

  interface CommonUser {

     any lookup(in EmployeeNo ENo);

  };

  interface Administrator : CommonUser {

     void delete(in EmployeeNo ENo);

  };

  interface Access {

      typedef string<10> UserID;
      typedef string<10> Password;

      CommonUser logon(in UserID ID, in Password PW);

  };

};
#endif

But what should, for example, the lookup operation return? One option
      is to use the any data type. But, depending on what kind of data it
      encapsulates, this datatype can be rather expensive to use. We might find a
      solution to our problems among the Constructed IDL types.

6.6
        Constructed OMG IDL Types

Constructed types all have native mappings as shown in the table
      below.

        Type
        IDL code
        Maps to
        Erlang code

        struct
        struct myStruct {

long a;

short b;

};

void op(in myStruct a);
        Erlang record
        ok = op(Obj, #'myStruct'{a=300, b=127}),

        union
        union myUnion switch(long) {

case 1: long a;

};

void op(in myUnion a);
        Erlang record
        ok = op(Obj, #'myUnion'{label=1, value=66}),

        enum
        enum myEnum {one, two};

void op(in myEnum a);
        Erlang atom
        ok = op(Obj, one),

Table
        6.3:

        OMG IDL constructed types

Struct Data Type

A struct may have Basic, Template, Scoped Names and Constructed
        types as members. By using forward declaration we can define a recursive struct:

struct myStruct; // Forward declaration
typedef sequence<myStruct> myStructSeq;
struct myStruct {
    myStructSeq chain;
};

// Deprecated definition (anonymous) not supported by IC
struct myStruct {
    sequence<myStruct> chain;
};

Enum Data Type

The maximum number of identifiers which may defined in an enumeration
        is 2³². The order in which the identifiers are named in the
        specification of an enumeration defines the relative order of the
        identifiers.

Union Data Type

A union may consist of:

Identifier

Switch - may be an integer, char, boolean, enum or scoped name.

Body - with or without a default case; may appear at
         most once.

A case label must match the defined type of the discriminator, and may only
        contain a default case if the values given in the non-default labels do
        not cover the entire range of the union's discriminant type. For example:

// Illegal default; all cases covered by
// non-default cases.
union BooleanUnion switch(boolean) {
  case TRUE:  long TrueValue;
  case FALSE: long FalseValue;
  default: long DefaultValue;
};
// OK
union BooleanUnion2 switch(boolean) {
  case TRUE:  long TrueValue;
  default: long DefaultValue;
};

It is not necessary to list all possible values of the union discriminator
        in the body. Hence, the value of a union is the value of the discriminator
        and, in given order, one of the following:

If the discriminator match a label, explicitly listed in a
         case statement, the value must be of the same type.

If the union contains a default label, the value must match the
         type of the default label.

No value. Orber then inserts the Erlang atom undefined
         in the value field when receiving a union from an external
         ORB.

The above can be summed up to:

// If the discriminator equals 1 or 2 the value
// is a long. Otherwise, the atom undefined.
union LongUnion switch(long) {
  case 1:
  case 2:  long TrueValue;
};
// If the discriminator equals 1 or 2 the value
// is a long. Otherwise, a boolean.
union LongUnion2 switch(long) {
  case 1:
  case 2:  long TrueValue;
  default: boolean DefaultValue;
};

In the same way as structs, unions can be recursive if forward
         declaration is used (anonymous types is deprecated and not supported):

// Forward declaration
union myUnion;
typedef sequence<myUnion>myUnionSeq;
union myUnion switch (long) {
    case 1 : myUnionSeq chain;
    default: boolean DefaultValue;
};

Note

Recursive types (union and struct) require Light IFR. I.e. the
         IC option {light_ifr, true} is used and that Orber is configured in such a way that
         Light IFR is activated. Recursive TypeCode is currently not supported, which is
         why these cannot be encapsulated in an any data type.

Warning

Every field in, for example, a struct must be initiated. Otherwise
        it will be set to the atom undefined, which Orber cannot
        encode when communicating via IIOP. In the example above, invoking
        the operation with #'myStruct'{a=300} will fail (equal to
        #'myStruct'{a=300, b=undefined})

Now we can continue to work on our IDL specification. To begin with, we should
      determine the return value of the lookup operation. Since the any
      type can be rather expensive we can use a struct or a union instead.
      If we intend to return the same information about a employee every time we can
      use a struct. Let us assume that the DB contains the name, address, employee
      number and department.

// DB IDL
#ifndef _DB_IDL_
#define _DB_IDL_
module DB {

  typedef unsigned long EmployeeNo;

  enum Department {Department1, Department2};

  struct employee {
        EmployeeNo No;
        string Name;
        string Address;
        Department Dpt;
  };

  typedef employee EmployeeData;

  interface CommonUser {

     EmployeeData lookup(in EmployeeNo ENo);

  };

  interface Administrator : CommonUser {

     void delete(in EmployeeNo ENo);

  };

  interface Access {

      typedef string<10> UserID;
      typedef string<10> Password;

      // Since Administrator inherits from CommonUser
      // the returned Object can be of either type.
      CommonUser logon(in UserID ID, in Password PW);

  };

};
#endif

We can also define exceptions (i.e. not system exception) thrown by
      each interface. Since exceptions are thoroughly described in the chapter
      System and User Defined Exceptions,
      we choose not to. Hence, we are now ready to compile our IDL-file by
      invoking:

$ erlc DB.idl

or:

$ erl
Erlang (BEAM) emulator version 5.1.1 [threads:0]

Eshell V5.1.1  (abort with ^G)
1> ic:gen('DB').
ok
2> halt().

The next step is to implement our servers. But, to be able to do that,
      we need to know how we can access data type definitions. For example,
      since a struct is mapped to an Erlang record we must include an hrl-file
      in our callback module.

6.7
        Scoped Names and Generated Files

Scoped Names

Within a scope all identifiers must be unique. The following kinds of
        definitions form scopes in the OMG IDL:

module

interface

operation

valuetype

struct

union

exception

For example, since enumerants do not form a scope, the following IDL code
        is not valid:

module MyModule {
     // 'two' is not unique
     enum MyEnum {one, two};
     enum MyOtherEnum {two, three};
};

But, since Erlang only has two levels of scope, module and
        function, the OMG IDL scope is mapped as follows:

Function Scope - used for constants, operations and attributes.

Erlang Module Scope - the Erlang module scope
         handles the remaining OMG IDL scopes.

An Erlang module, corresponding to an IDL global name, is derived by
        converting occurrences of "::" to underscore, and eliminating
        the leading "::". Hence, accessing MyEnum from another module, one
        use MyModule::MyEnum

For example, an operation foo defined in interface I, which
        is defined in module M, would be written in IDL as M::I::foo
        and as 'M_I':foo in Erlang - foo is the function
        name and 'M_I' is the name of the Erlang module. Applying this
        knowledge to a stripped version of the DB.idl gives:

// DB IDL
#ifndef _DB_IDL_
#define _DB_IDL_
// ++ topmost scope ++
// IC generates oe_XX.erl and oe_XX.hrl.
// XX is equal to the name of the IDL-file.
// Tips: create one IDL-file for each top module
// and give the file the same name (DB.idl).
// The oe_XX.erl module is used to register data
// in the IFR.
module DB {

  // ++ Module scope ++
  // To access 'EmployeeNo' from another scope, use:
  // DB::EmployeeNo, DB::Access etc.
  typedef unsigned long EmployeeNo;

  enum Department {Department1, Department2};

  // Definitions of this struct is contained in:
  // DB.hrl
  // Access functions exported by:
  // DB_employee.erl
  struct employee {
     ... CUT ...
  };

  typedef employee EmployeeData;

  ... CUT ...

  // If this interface should inherit an interface
  // in another module (e.g. OtherModule) use:
  // interface Access : OtherModule::OtherInterface
  interface Access {

      // ++ interface scope ++
      // Types within this scope is accessible via:
      // DB::Access::UserID
      // The Stub/Skeleton for this interface is
      // placed in the module:
      // DB_Access.erl
      typedef string<10> UserID;
      typedef string<10> Password;

      // Since Administrator inherits from CommonUser
      // the returned Object can be of either type.
      // This operation is exported from:
      // DB_Access.erl
      CommonUser logon(in UserID ID, in Password PW);

  };

};
#endif

Using underscores in IDL names can lead to ambiguities
        due to the name mapping described above. It is advisable to
        avoid the use of underscores in identifiers. For example, the following
        definition would generate two structures named x_y_z.

module x {

    struct y_z {
    ...
    };

    interface y {

    struct z {
        ...
    };
    };
};

Generated Files

Several files can be generated for each scope.

An Erlang source code file (.erl) is generated
         for top level scope as well as the Erlang header file.

An Erlang header file (.hrl) will be generated for
         each scope. The header file will contain record definitions
         for all struct, union and exception
         types in that scope.

Modules that contain at least one constant definition,
         will produce Erlang source code files (.erl).
         That Erlang file will contain constant functions for
         that scope.
         Modules that contain no constant definitions are considered
         empty and no code will be produced for them, but only for
         their included modules/interfaces.

Interfaces will produce Erlang source code files (.erl),
         this code will contain all operation stub code and implementation
         functions.

In addition to the scope-related files, an Erlang source file will
         be generated for each definition of the types struct,
        union and exception (these are the types that
         will be represented in Erlang as records).
         This file will contain special access functions for that record.

The top level scope will produce two files, one header file
         (.hrl) and one Erlang source file (.erl).
         These files are named as the IDL file, prefixed with oe_.

After compiling DB.idl, the following files have been generated:

oe_DB.hrl and oe_DB.erl for the top scope level.

DB.hrl for the module DB.

DB_Access.hrl and DB_Access.erl for the interface
        DB_Access.

DB_CommonUser.hrl and DB_CommonUser.erl for the interface
        DB_CommonUser.

DB_Administrator.hrl and DB_Administrator.erl for the interface
        DB_Administrator.

DB_employee.erl for the structure employee in module
        DB.

Since the employee struct is defined in the top level scope,
        the Erlang record definition is found in DB.hrl. IC also generates
        stubs/skeletons (e.g. DB_CommonUser.erl) and access functions for
        some datatypes (e.g. DB_employee.erl). How the stubs/skeletons are
        used is thoroughly described in
        Stubs/Skeletons and
        Module_Interface.

6.8
        Typecode, Identity and Name Access Functions

As mentioned in a previous section, struct, union and
      exception types yield record definitions and access code
      for that record.
      For struct, union, exception, array and
      sequence types, a special file is generated that holds access
      functions for TypeCode, Identity and Name.
      These functions are put in the file corresponding to the scope where
      they are defined. For example, the module DB_employee.erl,
      representing the employee struct, exports the following functions:

tc/0 - returns the type code for the struct.

id/0 - returns the IFR identity of the struct. In this case
       the returned value is "IDL:DB/employee:1.0", but
       if the struct was defined in the scope of CommonUser,
       the result would be "IDL:DB/CommonUser/employee:1.0".
       However, the user usually do not need to know the Id, just
       which Erlang module contains the correct Id.

name/0 - returns the scoped name of the struct. The employee
       struct name is "DB_employee".

Type Codesare, for example, used in Any values.
      Hence, we can encapsulate the employee struct in an any
      type by:

%% Erlang code
....
AnEmployee = #'DB_employee'{'No'      = 1,
                            'Name'    = "Adam Ivan Kendall",
                            'Address' = "Rasunda, Solna",
                            'Dpt'     = 'Department1'},
EmployeeTC = 'DB_employee':tc(),
EmployeeAny = any:create(EmployeeTC, AnEmployee),
....

For more information, see the
      Type Code listing.

6.9
        References to Constants

Constants are generated as Erlang functions, and are accessed by a
      single function call. The functions are put in the file
      corresponding to the scope where they are defined. There is no
      need for an object to be started to access a constant.

Example:

// m.idl
module m {
    const float pi = 3.14;

    interface i {
    const float pi = 3.1415;
    };
};

Since the two constants are defined in different scopes, the IDL code
      above is valid, but not necessarily a good approach. After compiling
      m.idl, the constant definitions can be extracted by invoking:

$ erlc m.idl
$ erlc m.erl
$ erl
Erlang (BEAM) emulator version 5.1.1 [threads:0]

Eshell V5.1.1  (abort with ^G)
1> m:pi().
3.14
2> m_i:pi().
3.1415
3> halt().

6.10
        References to Objects Defined in OMG IDL

Objects are accessed by object references. An object reference
      is an opaque Erlang term created and maintained by the ORB.

Objects are implemented by providing implementations for all
      operations and attributes of the Object, see operation implementation.

6.11
        Exceptions

Exceptions are handled as Erlang catch and throws. Exceptions
      are translated to messages over an IIOP bridge but converted
      back to a throw on the receiving side. Object implementations
      that invoke operations on other objects must be aware of the
      possibility of a non-local return. This includes invocation of
      ORB and IFR services. See also the
      Exceptions section.

Exception parameters are mapped as an Erlang record and accessed
      as such.

An object implementation that raises an exception will use the
      corba:raise/1 function, passing the exception record as
      parameter.

6.12
        Access to Attributes

Attributes are accessed through their access functions. An
      attribute implicitly defines the _get and _set
      operations. These operations are handled in the same way as
      normal operations. The _get operation is defined as a readonly
      attribute.

readonly attribute long RAttribute;
attribute long RWAttribute;

The RAttribute requires that you implement, in your call-back module,
      _get_RAttribute. For the RWAttribute it is necessary to implement
      _get_RWAttribute and _set_RWAttribute.

6.13
        Invocations of Operations

A standard Erlang gen_server behavior is used for
      object implementation. The gen_server state is then
      used as the object internal state. Implementation of the object
      function is achieved by implementing its methods and attribute operations.
      These functions will usually have the internal state as their first parameter,
      followed by any in and inout parameters.

Do not confuse the
      object internal state with its object reference. The object internal state is
      an Erlang term which has a format defined by the user.

Note

It is not always the case that the internal state will be the first parameter, as stubs can use their own object reference as the first parameter (see the IC documentation).

A function call will invoke an operation. The first
      parameter of the function should be the object reference and then
      all in and inout parameters follow in the same
      order as specified in the IDL specification. The result will be a return value
      unless the function has inout or out parameters specified;
      in which case, a tuple of the return value, followed by the parameters will
      be returned.

Example:

// IDL
module m {
  interface i {
      readonly attribute long RAttribute;
      attribute long RWAttribute;
      long foo(in short a);
      long bar(in char c, inout string s, out long count);
      void baz(out long Id);
  };
};

Is used in Erlang as :

%% Erlang code
....
Obj = ...    %% get object reference
RAttr  = m_i:'_get_RAttribute'(Obj),
RWAttr = m_i:'_get_RWAttribute'(Obj),
ok = m_i:'_set_RWAttribute'(Obj, Long),
R1 = m_i:foo(Obj, 55),
{R2, S, Count} = m_i:bar(Obj, $a, "hello"),
....

Note how the inout parameter is passed and
      returned. There is no way to use a single occurrence of a
      variable for this in Erlang. Also note, that ok, Orber's
      representation of the IDL-type void, must be returned by
      baz and '_set_RWAttribute'.
      These operations can be implemented in the call-back module as:

'_set_RWAttribute'(State, Long) ->
    {reply, ok, State}.

'_get_RWAttribute'(State) ->
    {reply, Long, State}.

'_get_RAttribute'(State) ->
    {reply, Long, State}.

foo(State, AShort) ->
    {reply, ALong, State}.

bar(State, AShort, AString) ->
    {reply, {ALong, "MyString", ALong}, State}.

baz(State) ->
    {reply, {ok, AId}, State}.

The operations may require more arguments (depends on IC options used). For
      more information, see Stubs/Skeletons
      and Module_Interface.

Warning

A function can also be defined to be oneway, i.e.
        asynchronous. But, since the behavior of a oneway operation is not
        defined in the OMG specifications (i.e. the behavior can differ depending on
        which other ORB Orber is communicating with), one should avoid using it.

6.14
        Implementing the DB Application

Now we are ready to implement the call-back modules. There are three modules
      we must create:

DB_Access_impl.erl

DB_CommonUser_impl.erl

DB_Administrator_impl.erl

An easy way to accomplish that, is to use the IC backend erl_template,
      which will generate a complete call-back module. One should also add
      the same compile options, for example this or from,
      used when generating the stub/skeleton modules:

$> erlc +"{be,erl_template}" DB.idl

We begin with implementing the DB_Access_impl.erl module, which,
      if we used erl_template, will look like the following. All we need
      to do is to add the logic to the logon operation.

%%----------------------------------------------------------------------
%% <LICENSE>
%%
%%     $Id$
%%
%%----------------------------------------------------------------------
%% Module       : DB_Access_impl.erl
%%
%% Source       : /home/user/example/DB.idl
%%
%% Description  :
%%
%% Creation date: 2005-05-20
%%
%%----------------------------------------------------------------------
-module('DB_Access_impl').

-export([logon/3]).

%%----------------------------------------------------------------------
%% Internal Exports
%%----------------------------------------------------------------------
-export([init/1,
         terminate/2,
         code_change/3,
         handle_info/2]).

%%----------------------------------------------------------------------
%% Include Files
%%----------------------------------------------------------------------

%%----------------------------------------------------------------------
%% Macros
%%----------------------------------------------------------------------

%%----------------------------------------------------------------------
%% Records
%%----------------------------------------------------------------------
-record(state, {}).

%%======================================================================
%% API Functions
%%======================================================================
%%----------------------------------------------------------------------
%% Function   : logon/3
%% Arguments  : State - term()
%%              ID = String()
%%              PW = String()
%% Returns    : ReturnValue = OE_Reply
%%              OE_Reply = Object_Ref()
%% Raises     :
%% Description:
%%----------------------------------------------------------------------
logon(State, ID, PW) ->
    %% Check if the ID/PW is valid and what
    %% type of user it is (Common or Administrator).
    OE_Reply
            = case check_user(ID, PW) of
             {ok, administrator} ->
                'DB_Administrator':oe_create();
             {ok, common} ->
                'DB_CommonUser':oe_create();
             error ->
                %% Here we should throw an exception
                corba:raise(....)
        end,
    {reply, OE_Reply, State}.

%%======================================================================
%% Internal Functions
%%======================================================================
%%----------------------------------------------------------------------
%% Function   : init/1
%% Arguments  : Env = term()
%% Returns    : {ok, State}          |
%%              {ok, State, Timeout} |
%%              ignore               |
%%              {stop, Reason}
%% Raises     : -
%% Description: Initiates the server
%%----------------------------------------------------------------------
init(_Env) ->
    {ok, #state{}}.

%%----------------------------------------------------------------------
%% Function   : terminate/2
%% Arguments  : Reason = normal | shutdown | term()
%%              State = term()
%% Returns    : ok
%% Raises     : -
%% Description: Invoked when the object is terminating.
%%----------------------------------------------------------------------
terminate(_Reason, _State) ->
    ok.

%%----------------------------------------------------------------------
%% Function   : code_change/3
%% Arguments  : OldVsn = undefined | term()
%%              State = NewState = term()
%%              Extra = term()
%% Returns    : {ok, NewState}
%% Raises     : -
%% Description: Invoked when the object should update its internal state
%%              due to code replacement.
%%----------------------------------------------------------------------
code_change(_OldVsn, State, _Extra) ->
    {ok, State}.

%%----------------------------------------------------------------------
%% Function   : handle_info/2
%% Arguments  : Info = normal | shutdown | term()
%%              State = NewState = term()
%% Returns    : {noreply, NewState}          |
%%              {noreply, NewState, Timeout} |
%%              {stop, Reason, NewState}
%% Raises     : -
%% Description: Invoked when, for example, the server traps exits.
%%----------------------------------------------------------------------
handle_info(_Info, State) ->
    {noreply, State}.

Since DB_Administrator inherits from DB_CommonUser,
      we must implement delete in the DB_Administrator_impl.erl
      module, and lookup in DB_Administrator_impl.erlandDB_CommonUser_impl.erl. But wait, is that really necessary? Actually,
      it is not. We simple use the IC compile option impl:

$ erlc +'{{impl, "DB::CommonUser"}, "DBUser_impl"}'\
 +'{{impl, "DB::Administrator"}, "DBUser_impl"}' DB.idl
$ erlc *.erl

Instead of creating, and not the least, maintaining two call-back modules,
      we only have to deal with DBUser_impl.erl. If we generated the
      templates, we simply rename DB_Administrator_impl.erl to
      DBUser_impl.erl. See also the
      Exceptions chapter.
      In the following example, only the implementation of the API functions
      are shown:

%%======================================================================
%% API Functions
%%======================================================================
%%----------------------------------------------------------------------
%% Function   : delete/2
%% Arguments  : State - term()
%%              ENo = unsigned_Long()
%% Returns    : ReturnValue = ok
%% Raises     :
%% Description:
%%----------------------------------------------------------------------
delete(State, ENo) ->
        %% How we access the DB, for example mnesia, is not shown here.
        case delete_employee(No) of
            ok ->
                {reply, ok, State};
            error ->
                %% Here we should throw an exception if
                %% there is no match.
                corba:raise(....)
        end.

%%----------------------------------------------------------------------
%% Function   : lookup/2
%% Arguments  : State - term()
%%              ENo = unsigned_Long()
%% Returns    : ReturnValue = OE_Reply
%%              OE_Reply = #'DB_employee'{No,Name,Address,Dpt}
%%              No = unsigned_Long()
%%              Name = String()
%%              Address = String()
%%              Dpt = Department
%%              Department = 'Department1' | 'Department2'
%% Raises     :
%% Description:
%%----------------------------------------------------------------------
lookup(State, ENo) ->
        %% How we access the DB, for example mnesia, is not shown here.
        case lookup_employee(ENo) of
            %% We assume that we receive a 'DB_employee' struct
            {ok, Employee} ->
                OE_Reply = Employee,
                {reply, OE_Reply, State};
            error ->
                %% Here we should throw an exception if
                %% there is no match.
                corba:raise(....)
        end.

After you have compiled both call-back modules, and implemented the missing
      functionality (e.g. lookup_employee/1), we can test our application:

%% Erlang code
....
%% Create an Access object
Acc = 'DB_Access':oe_create(),

%% Login is Common user and Administrator
Adm = 'DB_Access':logon(A, "admin", "pw"),
Com = 'DB_Access':logon(A, "comm", "pw"),

%% Lookup existing employee
Employee = 'DB_Administrator':lookup(Adm, 1),
Employee = 'DB_CommonUser':lookup(Adm, 1),

%% If we try the same using the DB_CommonUser interface
%% it result in an exit since that operation is not exported.
{'EXIT', _} = (catch 'DB_CommonUser':delete(Adm, 1)),

%% Try to delete the employee via the CommonUser Object
{'EXCEPTION', _} = (catch 'DB_Administrator':delete(Com, 1)),

%% Invoke delete operation on the Administrator object
ok = 'DB_Administrator':delete(Adm, 1),
....

6.15
        Reserved Compiler Names and Keywords

The use of some names is  strongly discouraged due to
      ambiguities. However, the use of some names is prohibited
      when using the Erlang mapping , as they are strictly reserved for IC.

IC reserves all identifiers starting with OE_ and oe_
      for internal use.

Note also, that an identifier in IDL can  contain alphabetic,
      digits and underscore characters, but the first character
      must be alphabetic.

The OMG defines a set of reserved words, shown below, for use as keywords.
      These may not be used as, for example, identifiers. The keywords
      which are not in bold face was introduced in the OMG CORBA-3.0
      specification.

        abstract
        exception
        inout
        provides
        truncatable

        any
        emits
        interface
        public
        typedef

        attribute
        enum
        local
        publishes
        typeid

        boolean
        eventtype
        long
        raises
        typeprefix

        case
        factory
        module
        readonly
        unsigned

        char
        FALSE
        multiple
        setraises
        union

        component
        finder
        native
        sequence
        uses

        const
        fixed
        Object
        short
        ValueBase

        consumes
        float
        octet
        string
        valuetype

        context
        getraises
        oneway
        struct
        void

        custom
        home
        out
        supports
        wchar

        default
        import
        primarykey
        switch
        wstring

        double
        in
        private
        TRUE

Table
        6.4:

        OMG IDL keywords

The keywords listed above must be written exactly as shown. Any usage
      of identifiers that collide with a keyword is illegal. For example,
      long is a valid keyword; Long and LONG are
      illegal as keywords and identifiers. But, since the OMG must be able
      to expand the IDL grammar, it is possible to use Escaped  Identifiers. For example, it is not unlikely that native
      have been used in IDL-specifications as identifiers. One option is to
      change all occurrences to myNative. Usually, it is necessary
      to change programming language code that depends upon that IDL as well.
      Since Escaped Identifiers just disable type checking (i.e. if it is a reserved
      word or not) and leaves everything else unchanged, it is only necessary to
      update the IDL-specification. To escape an identifier, simply prefix it
      with _. The following IDL-code is illegal:

typedef string native;
interface i {
   void foo(in native Arg);
   };
};

With Escaped Identifiers the code will look like:

typedef string _native;
interface i {
   void foo(in _native Arg);
   };
};

6.16
        Type Code Representation

Type Codes are used in any values. To avoid mistakes, you should
      use access functions exported by the Data Types modules
      (e.g. struct, union etc) or the orber_tc
      module.

        Type Code
        Example

        tk_null

        tk_void

        tk_short

        tk_long

        tk_longlong

        tk_ushort

        tk_ulong

        tk_ulonglong

        tk_float

        tk_double

        tk_boolean

        tk_char

        tk_wchar

        tk_octet

        tk_any

        tk_TypeCode

        tk_Principal

        {tk_objref, IFRId, Name}
        {tk_objref, "IDL:M1\I1:1.0", "I1"}

        {tk_struct, IFRId, Name, [{ElemName, ElemTC}]}
        {tk_struct, "IDL:M1\S1:1.0", "S1", [{"a", tk_long}, {"b", tk_char}]}

        {tk_union, IFRId, Name, DiscrTC, DefaultNr, [{Label, ElemName, ElemTC}]}

Note: DefaultNr tells which of tuples in the case list that is default, or -1 if no default
        {tk_union, "IDL:U1:1.0", "U1", tk_long, 1, [{1, "a", tk_long}, {default, "b", tk_char}]}

        {tk_enum, IFRId, Name, [ElemName]}
        {tk_enum, "IDL:E1:1.0", "E1", ["a1", "a2"]}

        {tk_string, Length}
        {tk_string, 5}

        {tk_wstring, Length}
        {tk_wstring, 7}

        {tk_fixed, Digits, Scale}
        {tk_fixed, 3, 2}

        {tk_sequence, ElemTC, Length}
        {tk_sequence, tk_long, 4}

        {tk_array, ElemTC, Length}
        {tk_array, tk_char, 9}

        {tk_alias, IFRId, Name, TC}
        {tk_alias, "IDL:T1:1.0", "T1", tk_short}

        {tk_except, IFRId, Name, [{ElemName, ElemTC}]}
        {tk_except, "IDL:Exc1:1.0", "Exc1", [{"a", tk_long}, {"b", {tk_string, 0}}]}

Table
        6.5:

        Type Code tuples

Copyright © 1997-2016 Ericsson AB. All Rights Reserved.