Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sys/src/ape/9src/cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ main(int argc, char *argv[])
case 'N':
case 'T':
case 'w':
case 'F':
append(&cc, smprint("-%c", ARGC()));
break;
case 'B':
append(&cc, "-B");
Aflag = 1;
break;
Comment on lines +128 to +131

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Setting Aflag = 1 when the -B flag is encountered will suppress the automatic addition of the APE-specific include paths (e.g., -I/sys/include/ape) later in the code. In ape/cc, Aflag is the toggle for ANSI mode, which disables the APE environment. Since -B is often passed by mkfiles that still expect the APE environment, this change will cause compilation failures due to missing headers.

To silence the warning while preserving the correct behavior, you should simply break in the case 'B' block. The existing logic later in main will handle adding the -B flag and the necessary include paths if Aflag remains 0.

		case 'B':
			break;

case 'O':
break;
case 'W':
Expand Down
Loading