With sh and csh d name args definition works d and u

Info icon This preview shows pages 61–63. Sign up to view the full content.

View Full Document Right Arrow Icon
With sh and csh , ‘ -D’ name ( args... )= definition ’ works. -D ’ and ‘ -U ’ options are processed in the order they are given on the command line. All ‘ -imacros file ’ and ‘ -include file ’ options are processed after all -D ’ and ‘ -U ’ options. -U name Cancel any previous definition of name , either built in or provided with a ‘ -D option. -undef Do not predefine any system-specific or GCC-specific macros. The standard pre- defined macros remain defined. See Section 3.7.1 [Standard Predefined Macros], page 21 . -I dir Add the directory dir to the list of directories to be searched for header files. See Section 2.3 [Search Path], page 9 . Directories named by ‘ -I ’ are searched before the standard system include directories. If the directory dir is a standard system include directory, the option is ignored to ensure that the default search order for system directories and the special treatment of system headers are not defeated (see Section 2.8 [System Headers], page 13 ) . If dir begins with = , then the = will be replaced by the sysroot prefix; see ‘ --sysroot ’ and ‘ -isysroot ’. -o file Write output to file . This is the same as specifying file as the second non-option argument to cpp . gcc has a different interpretation of a second non-option argument, so you must use ‘ -o ’ to specify the output file. -Wall Turns on all optional warnings which are desirable for normal code. At present this is ‘ -Wcomment ’, ‘ -Wtrigraphs ’, ‘ -Wmultichar ’ and a warning about integer promotion causing a change of sign in #if expressions. Note that many of the preprocessor’s warnings are on by default and have no options to control them. -Wcomment -Wcomments Warn whenever a comment-start sequence ‘ /* ’ appears in a ‘ /* ’ comment, or whenever a backslash-newline appears in a ‘ // ’ comment. (Both forms have the same effect.) -Wtrigraphs Most trigraphs in comments cannot affect the meaning of the program. How- ever, a trigraph that would form an escaped newline (‘ ??/ ’ at the end of a line) can, by changing where the comment begins or ends. Therefore, only trigraphs that would form escaped newlines produce warnings inside a comment. This option is implied by ‘ -Wall ’. If ‘ -Wall ’ is not given, this option is still enabled unless trigraphs are enabled. To get trigraph conversion without warnings, but get the other ‘ -Wall ’ warnings, use ‘ -trigraphs -Wall -Wno-trigraphs ’. -Wtraditional Warn about certain constructs that behave differently in traditional and ISO C. Also warn about ISO C constructs that have no traditional C equivalent, and problematic constructs which should be avoided. See Chapter 10 [Traditional Mode], page 48 .
Image of page 61

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

View Full Document Right Arrow Icon
Chapter 12: Invocation 58 -Wundef Warn whenever an identifier which is not a macro is encountered in an ‘ #if directive, outside of ‘ defined ’. Such identifiers are replaced with zero.
Image of page 62
Image of page 63
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