preprocessor/7558: preprocessor option -MM has change semantic
boehme@informatik.hu-berlin.de
boehme@informatik.hu-berlin.de
Fri Aug 9 09:26:00 GMT 2002
>Number: 7558
>Category: preprocessor
>Synopsis: preprocessor option -MM has change semantic
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Aug 09 09:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.1.1 (Debian testing/unstable)
>Organization:
>Environment:
System: Linux kosh 2.4.18-k7 #1 Sun Apr 14 13:19:11 EST 2002 i686 unknown unknown GNU/Linux
Architecture: i686
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds3/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-__cxa_atexit --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux
>Description:
In gcc 3.1, -MM prints dependencies even to files included with
angle brackets (<foo.h>), if those are found through -I options.
This behaviour is unintuitive and a change from earlier versions.
It appears that the only way to suppress these files is to use the
-isystem directive, which is quite gcc specific and hard to use
in a makefile that needs to work across different compilers, or
that is generated by autoconf.
>How-To-Repeat:
Compile the file
#include <a.h>
int
main()
{
}
with gcc -I. -MM; this gives
a.o: a.c a.h
even though a.h should not have been mentioned.
>Fix:
No real work-around is known.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list