This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A question related to "-I" option of CPP (C preprocessor)


Hi, experts of CPP/ GCC,

    I met with a problem related to -I option of CPP. Actually it is a
compatiblity issue between old version CPP and new version CPP.

    Suppose, we run cpp with the following command:
        cpp -E -I./inc/subinc -traditional a.sp
where a.sp is an empty file, and ./inc/subinc is a directory, but we
don't have the read permission of
the directory inc.

    For the version 3.2.3 cpp, the run will succeed and the content of
a.sp will be dumped into
screen.
    But, for the version 4.1.1, the run will fail, and the error
message is as following:
cc1: error: ./inc/subinc: Permission denied

    Actually, cpp doesn't even use the path ./inc/subinc as a.sp is empty.
We can see that, v4.1.1 checks the permission of ./inc/subinc even it
doesn't use the dir. But, v3.2.3 runs
in a loose way.

    Now, I wanna use v4.1.1, but I don't want v4.1.1 fail when running
in the above case. I want v4.1.1 to succeed
just as v3.2.3.

    Can I achieve what I want? Is there an back compatible option or something?

    BTW, I don't know if it is appropriate to ask the question in the
email list. But I didn't
find an email list related to CPP. So, if it is inappropriate, please
tell me the correct email
list.

Thanks,
Jun YUAN


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]