Suggested warning: "./include/pch.h.gch: not used because -save-temps specified"

Carlo Wood carlo@alinoe.com
Mon Oct 6 13:31:00 GMT 2003


The proposed warning:

cc1plus: ./include/pch.h.gch: not used because -save-temps specified

is a combination of the existing warnings:

  g++: warning: -pipe ignored because -save-temps specified

and

  cc1plus: ./include/pch.h.gch: not used because `__NO_INLINE__' not defined


The reason is that when -save-temps is used, PCH is silently disabled at
the moment.  This is confusing because it leads to:


# gcc -O -Winvalid-pch -include pch.h -c foo.c -save-temps
(no error or warning)
# gcc -O -Winvalid-pch -include pch.h -c foo.c
cc1: ./pch.h.gch: not used because `__NO_INLINE__' not defined

It would be less confusing that when -Winvalid-pch and -save-temps
are used together, a warning simular to the one for -pipe is given.

Any opinions?

-- 
Carlo Wood <carlo@alinoe.com>



More information about the Gcc mailing list