public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/42921]  New: No error with missing header and -MM
@ 2010-02-01  3:50 rhansen at bbn dot com
  2010-02-07 20:33 ` [Bug preprocessor/42921] " pinskia at gcc dot gnu dot org
  2010-02-08  5:33 ` rhansen at bbn dot com
  0 siblings, 2 replies; 4+ messages in thread
From: rhansen at bbn dot com @ 2010-02-01  3:50 UTC (permalink / raw)
  To: gcc-bugs

The -MM option does not raise an error if the source includes a non-existent
header using angle brackets:

$ echo "#include <does_not_exist.h>" > foo.c
$ gcc -MM -MF foo.d foo.c && echo succeeded || echo failed
succeeded
$ cat foo.d
foo.o: foo.c

Including a file using double quotes does produce an error as expected:

$ echo '#include "does_not_exist.h"' > foo.c
$ gcc -MM -MF foo.d foo.c && echo succeeded || echo failed
foo.c:1:28: fatal error: does_not_exist.h: No such file or directory
compilation terminated.
failed

Seen in current trunk:
$ gcc -v
Using built-in specs.
COLLECT_GCC=./install/bin/gcc
COLLECT_LTO_WRAPPER=/home/rhansen/gcc_build/install/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/home/rhansen/gcc_build/install
--with-local-prefix=/home/rhansen/gcc_build/install --enable-languages=c
Thread model: posix
gcc version 4.5.0 20100131 (experimental) [trunk revision 156418] (GCC)

And in 4.4.1 from Ubuntu Karmic:
$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror
--with-arch-32=i486 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)


-- 
           Summary: No error with missing header and -MM
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rhansen at bbn dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42921


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <bug-42921-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2013-05-08  5:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-01  3:50 [Bug preprocessor/42921] New: No error with missing header and -MM rhansen at bbn dot com
2010-02-07 20:33 ` [Bug preprocessor/42921] " pinskia at gcc dot gnu dot org
2010-02-08  5:33 ` rhansen at bbn dot com
     [not found] <bug-42921-4@http.gcc.gnu.org/bugzilla/>
2013-05-08  5:30 ` skannan at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).