preprocessor/3645: -isystem args. ignored if already listed with -I

neil@fnxweb.com neil@fnxweb.com
Wed Jul 11 04:36:00 GMT 2001


>Number:         3645
>Category:       preprocessor
>Synopsis:       -isystem args. ignored if already listed with -I
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          mistaken
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 11 04:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Neil Bird
>Release:        gcc version 3.0
>Organization:
>Environment:
Sun sparc Solaris 2.6
(gcc 3.0 bootstrapped from 2.95.2)
>Description:
-isystem <dir> should flag <dir> as a system include dir. - in my case, to prevent wads of warnings of invalid Solaris /usr/openwin/include X headers.

However, if the user/Makefile has already given said dir. with -I, the -isystem is ignored (as the dir. has already been 'seen') instead of making that dir. flagged as 'system'.

This makes it apparently impossible to configure cc1plus via the specs file for these broken Solarises.
>How-To-Repeat:
Add '-isystem <dir>' to any cc1 related specs entry (e.g., cpp: or cc1:). Compile a file with '-v -I <dir>' and see that '-isystem' comes after the '-I' and gives a 'ignoring duplicate directory' message.
>Fix:
At a guess: cppinit.c's remove_dup_dirs() ought to ensure that any flags set (e.g., sysp from -isystem) in the copy to be deleted are set in the copy that's kept.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list