This is the mail archive of the
mailing list for the GCC project.
Re: reduce compilation times?
>>Splitting C files is different to splitting C++ files or splitting Java files,
>>Fortran, Ada, ObjC, ....
>In the case of C++, you can just put each method of a class in a separate .C file. Provided they all include a .H file which defines the class prototype it's ok.
The problem may not be the .cpp but the .h files. If I add a new member
or method all files of this class need to be rebuilt. With the independent
functions in C this may be easier to do. But still, if everything is rebuilt
then it doesn't matter how many files you spread your code over.
Of course from maintenance point of view splitting files is good though
I maybe wouldn't go down to function level, more like class level.
Otherwise the bad overview in the file is just transferred to the project