This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Define __NO_INLINE__ if not inlining (take 2)
Hi Jakub,
Whilst you're at it, could you define __PEDANTIC__ if -pedantic or
-pedantic-errors (i.e. -pedantic*)? That'd be great.
Thanks,
Neil.
Jakub Jelinek wrote:-
> Ok to commit then?
>
> 2001-05-04 Jakub Jelinek <jakub@redhat.com
>
> * gcc.c (cpp_options): Define __NO_INLINE__ unless we are honoring
> "inline" keyword.
> * cpp.texi (__NO_INLINE): Document it.
>
> --- gcc/gcc.c.jj Thu May 3 20:12:47 2001
> +++ gcc/gcc.c Fri May 4 22:08:38 2001
> @@ -647,7 +647,7 @@ static const char *cpp_options =
> %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
> %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
> %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
> - %{ffast-math:-D__FAST_MATH__}\
> + %{fno-inline|O0|!O*:-D__NO_INLINE__} %{ffast-math:-D__FAST_MATH__}\
> %{fshort-wchar:-U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\\ unsigned\\ int}\
> %{ffreestanding:-D__STDC_HOSTED__=0} %{fno-hosted:-D__STDC_HOSTED__=0}\
> %{!ffreestanding:%{!fno-hosted:-D__STDC_HOSTED__=1}}\
> --- gcc/cpp.texi.jj Wed Apr 18 15:45:14 2001
> +++ gcc/cpp.texi Fri May 4 22:35:33 2001
> @@ -1200,6 +1200,16 @@ for some system library functions. You
> definition of this macro unless you make very sure that programs will
> execute with the same effect regardless.
>
> +@item __NO_INLINE__
> +@findex __NO_INLINE__
> +GNU CC defines this macro if it will not attempt to inline functions
> +with @samp{inline} keyword (either when not optimizing or when inlining
> +has been explicitely forbidden through @samp{-fno-inline}). It causes
> +certain GNU header files to define alternative macro definitions for some
> +system library functions. You should not refer to or test the definition
> +of this macro unless you make very sure that programs will execute with
> +the same effect regardless.
> +
> @item __CHAR_UNSIGNED__
> @findex __CHAR_UNSIGNED__
> GNU C defines this macro if and only if the data type @code{char} is
>
>
> Jakub