GCC Wikia
Advertisement

このページを編集する際は,編集に関する方針に従ってください.[]

概要[]

引数[]

  • const char *gmsgid
  • ...

実装[]

469 /* A "pedantic" warning: issues a warning unless -pedantic-errors was
470    given on the command line, in which case it issues an error.  Use
471    this for diagnostics required by the relevant language standard,
472    if you have chosen not to make them errors.
473 
474    Note that these diagnostics are issued independent of the setting
475    of the -pedantic command-line switch.  To get a warning enabled
476    only with that switch, write "if (pedantic) pedwarn (...);"  */
477 void
478 pedwarn (const char *gmsgid, ...)
479 {
480   diagnostic_info diagnostic;
481   va_list ap;
482 
483   va_start (ap, gmsgid);
484   diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
485                        pedantic_error_kind ());
486   report_diagnostic (&diagnostic);
487   va_end (ap);
488 }

{{related}]

Advertisement