If md is used in conjunction with e any o switch is

Info icon This preview shows pages 64–66. Sign up to view the full content.

View Full Document Right Arrow Icon
If ‘ -MD ’ is used in conjunction with ‘ -E ’, any ‘ -o ’ switch is understood to specify the dependency output file (see [-MF], page 59 ), but if used without ‘ -E ’, each -o ’ is understood to specify a target object file. Since ‘ -E ’ is not implied, ‘ -MD ’ can be used to generate a dependency output file as a side-effect of the compilation process. -MMD Like ‘ -MD ’ except mention only user header files, not system header files. -x c -x c++ -x objective-c -x assembler-with-cpp Specify the source language: C, C ++ , Objective-C, or assembly. This has noth- ing to do with standards conformance or extensions; it merely selects which base syntax to expect. If you give none of these options, cpp will deduce the language from the extension of the source file: ‘ .c ’, ‘ .cc ’, ‘ .m ’, or ‘ .S ’. Some other common extensions for C ++ and assembly are also recognized. If cpp does not recognize the extension, it will treat the file as C; this is the most generic mode. Note: Previous versions of cpp accepted a ‘ -lang ’ option which selected both the language and the standards conformance level. This option has been re- moved, because it conflicts with the ‘ -l ’ option. -std= standard -ansi Specify the standard to which the code should conform. Currently CPP knows about C and C ++ standards; others may be added in the future. standard may be one of: c90 c89 iso9899:1990 The ISO C standard from 1990. ‘ c90 ’ is the customary shorthand for this version of the standard.
Image of page 64

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Chapter 12: Invocation 61 The ‘ -ansi ’ option is equivalent to ‘ -std=c90 ’. iso9899:199409 The 1990 C standard, as amended in 1994. iso9899:1999 c99 iso9899:199x c9x The revised ISO C standard, published in December 1999. Before publication, this was known as C9X. iso9899:2011 c11 c1x The revised ISO C standard, published in December 2011. Before publication, this was known as C1X. gnu90 gnu89 The 1990 C standard plus GNU extensions. This is the default. gnu99 gnu9x The 1999 C standard plus GNU extensions. gnu11 gnu1x The 2011 C standard plus GNU extensions. c++98 The 1998 ISO C ++ standard plus amendments. gnu++98 The same as ‘ -std=c++98 ’ plus GNU extensions. This is the default for C ++ code. -I- Split the include path. Any directories specified with ‘ -I ’ options before ‘ -I- are searched only for headers requested with #include " file " ; they are not searched for #include < file > . If additional directories are specified with ‘ -I options after the ‘ -I- ’, those directories are searched for all ‘ #include ’ direc- tives. In addition, ‘ -I- ’ inhibits the use of the directory of the current file directory as the first search directory for #include " file " . See Section 2.3 [Search Path], page 9 . This option has been deprecated. -nostdinc Do not search the standard system directories for header files. Only the direc- tories you have specified with ‘ -I ’ options (and the directory of the current file, if appropriate) are searched.
Image of page 65
Image of page 66
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern