From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15237 invoked by alias); 12 Jun 2005 11:37:14 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15157 invoked by uid 48); 12 Jun 2005 11:37:04 -0000 Date: Sun, 12 Jun 2005 11:37:00 -0000 Message-ID: <20050612113704.15156.qmail@sourceware.org> From: "c dot lemmen at fz-juelich dot de" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041111132926.18428.c.lemmen@fz-juelich.de> References: <20041111132926.18428.c.lemmen@fz-juelich.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/18428] No preprocessing option -cpp for gfortran X-Bugzilla-Reason: CC X-SW-Source: 2005-06/txt/msg01639.txt.bz2 List-Id: ------- Additional Comments From c dot lemmen at fz-juelich dot de 2005-06-12 11:36 ------- > "gfortran -x f95-cpp-input" works > maybe this should be documented. This is not the same. 1) The -x option states that ALL following input files should be treated as being of type 2) The former -cpp option stated that all following SOURCE files should be preprocessed In many legacy Makefiles, subroutines are compiled into object files, and in a last step the main code ist compiled and linked to all dependencies in ONE step, like gfortran main.f90 -o main sub1.o sub2.o sub3.o Now, for code with preprocessor directives, with other compilers you can specify to precompile the sources, like f90 -cpp main.f90 -o main sub1.o sub2.o sub3.o With gfortran and the -cpp option gone, someone who replaces the -cpp with -x f95-cpp-input (easy to do with FLAGS), a la gfortran -x f95-cpp-input main.f90 -o main sub1.o sub2.o sub3.o doesn't compile properly, since the binary object files are read as source (to be preprocessed) You would need to specify another -x object-input (or similar) before the object files, that makes it significantly harder to adjust or write Makefiles. Alternatively, all source must be compiled first and linked in a separate step. As stated above, this rather clean version is not considered in lots of existing Makefiles. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18428