Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#148 warning on file name case mismatch

open
nobody
None
1
2006-06-15
2006-06-15
No

SDCC should emit a warning if the case of the filename
in an #include directive does not match the case of the
included file.

While Windows doesn't care many non-MS operating
systems do. These systems treat files with different
casing as different files.
So compiling of sources written under Windows fails on
many non-MS systems. And there is not even a warning
for the programmer working under Windows. Not good.

And as a side note on case preference: *If* SDCC has a
choice, header files of CPU derivatives should be
committed with LOWER CASE filenames.

Rationale:
- Using upper case filenames is considered shouting.
- A mix of upper/lower case filenames is difficult to
maintain (especially with filesystems which do case
insensitive matching).
- all ANSI-C include files use lower case.
- There is little information which can be transmitted
by deliberately using upper or lower case (and one of
them is that a README or INSTALL file is listed on top
in a directory listing (which is spoiled by using upper
case for header files)).
- as the case insensitive systems usually do not have a
good track record of preserving cases any information
which could have been associated with cases has to be
considered unreliable.

Discussion

  • Borut Ražem
    Borut Ražem
    2008-02-17

    Logged In: YES
    user_id=568035
    Originator: NO

    The file names in #include directive are handled by preprocessor. Since SDCC uses a (slightly modified) GCC preprocessor, this feature request should be probably send to GCC cpp developers. I'm very curious about their response ;-)

    Borut