public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46444] New: termination of preprocessing by cpp when no include file is found
@ 2010-11-11 23:49 Igor.Smirnov at cern dot ch
  2011-10-09 16:12 ` [Bug preprocessor/46444] " paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: Igor.Smirnov at cern dot ch @ 2010-11-11 23:49 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: termination of preprocessing by cpp when no include
                    file is found
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Igor.Smirnov@cern.ch


Hi,

This is likely a change rather than a true accidental bug, but this 
looks like a wrong change.

This relates to preprocessor, but I assume that cpp is considering as part of
gcc package?

The problem is that the cpp-preprocessor now terminates the treatment after the
first non-resolved include directive, when no file is found. This did not
happen in the past. This is first noticed by me at varsion gcc 4.4.5.

Still in version gcc 3.4.6 and numerous previous versions this did not happen.

The previous behaviour gave unique possibility to compile semi-preprocessed
source files with all local (project-dependent) header files included but
system-dependent files not included. After that a necessary set of include
directoves could be added in the beginning of this file (by hand or
automatically) and this file became compiled virtually at any computer.

An application program gathered into a single file by this way could be moved
between different computers, compiled freely at any of them (even not
necessarily Linux-based one) without installation of a whole set of
project-related libraries (which could be difficult).

This is impossible to do in this way after this change.
If the preprocessor does not ignore the absent system include files (which 
are made inavailable by -nostdinc -nostdinc++ options), but writes as error
diagnostics and quits, the project-dependent files cannot be gathered and
preprocessed, unless they are specially prepared, which is very difficult.

If there is no any option which make possible ignoring by CPP absent includes
(with possible issuing diagnostic),
I propose to add such an option or to return to previous behaviour, when absent
includes did not terminate cpp.

Regards
     Igor Smirnov


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug preprocessor/46444] termination of preprocessing by cpp when no include file is found
  2010-11-11 23:49 [Bug c++/46444] New: termination of preprocessing by cpp when no include file is found Igor.Smirnov at cern dot ch
@ 2011-10-09 16:12 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-09 16:12 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at gcc dot gnu.org
          Component|c++                         |preprocessor

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-09 16:11:50 UTC ---
I suspect this is not going to happen. In any case, a preprocessor issue.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-09 16:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-11 23:49 [Bug c++/46444] New: termination of preprocessing by cpp when no include file is found Igor.Smirnov at cern dot ch
2011-10-09 16:12 ` [Bug preprocessor/46444] " paolo.carlini at oracle 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).