diff --git a/ispc.cpp b/ispc.cpp index ac0be154..2b98de86 100644 --- a/ispc.cpp +++ b/ispc.cpp @@ -140,16 +140,16 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa, isa = "sse4"; else isa = "sse2"; - fprintf(stderr, "Notice: no --target specified on command-line. " - "Using ISA \"%s\" based on specified CPU \"%s\".\n", isa, + Warning(SourcePos(), "No --target specified on command-line. " + "Using ISA \"%s\" based on specified CPU \"%s\".", isa, cpu); } else { // No CPU and no ISA, so use CPUID to figure out what this CPU // supports. isa = lGetSystemISA(); - fprintf(stderr, "Notice: no --target specified on command-line. " - "Using system ISA \"%s\".\n", isa); + Warning(SourcePos(), "No --target specified on command-line. " + "Using system ISA \"%s\".", isa); } } @@ -158,7 +158,7 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa, if (hostCPU.size() > 0) cpu = strdup(hostCPU.c_str()); else { - fprintf(stderr, "Warning: unable to determine host CPU!\n"); + Warning(SourcePos(), "Unable to determine host CPU!\n"); cpu = "generic"; } } diff --git a/module.cpp b/module.cpp index 528a4495..d109645d 100644 --- a/module.cpp +++ b/module.cpp @@ -924,8 +924,8 @@ Module::writeOutput(OutputType outputType, const char *outFileName, return 1; } if (fileType != NULL) - fprintf(stderr, "Warning: emitting %s file, but filename \"%s\" " - "has suffix \"%s\"?\n", fileType, outFileName, suffix); + Warning(SourcePos(), "Warning: emitting %s file, but filename \"%s\" " + "has suffix \"%s\"?", fileType, outFileName, suffix); } if (outputType == Header)