[Bug c++/54054] New: merged compilation
wbrana at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 20 16:29:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54054
Bug #: 54054
Summary: merged compilation
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: wbrana@gmail.com
Using command
g++-4.7.1 -O3 -march=core2 -v -o test func.cpp main.cpp
GCC compiles files separately with
cc1plus func.cpp
cc1plus main.cpp
GCC could merge these files and compile only file merged.cpp
-------func.cpp---------
#include "func.h"
#include <stdlib.h>
long int func() {
return random();
}
-------main.cpp--------
#include "func.h"
#include <stdlib.h>
int main() {
return func();
}
-----merged.cpp-------
#include "func.h"
#include <stdlib.h>
long int func() {
return random();
}
int main() {
return func();
}
More information about the Gcc-bugs
mailing list