NO

Author Topic: pocc preprocessor warnings not emitted on stderr  (Read 3127 times)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
pocc preprocessor warnings not emitted on stderr
« on: August 15, 2007, 08:48:51 PM »
pocc doesn't emit the preprocessor warnings on the stderr.
If you use the output with option /E the warnings get in the output.
Ie with the command:
Code: [Select]
    pocc /E foo.m > foo.Pif warnings are detected by the preprocessor they are output in the file foo.P and not on the screen via stderr.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: pocc preprocessor warnings not emitted on stderr
« Reply #1 on: August 17, 2007, 07:54:45 AM »
This is by design. I never use stderr as a general principle.
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: pocc preprocessor warnings not emitted on stderr
« Reply #2 on: August 17, 2007, 01:04:09 PM »
Thanks for the answer Pelle.
In general this could be acceptable considering that unlike in unix practice win programs doesn't use stdin/stdout as in/out devices when file names are omitted in command line. But in the case of the preprocessor output with the switch /E where your output is on stdout, and is not possible to redirect output to a file with the option /Fo, this is not correct IMO.
Please consider this feature for future releases.
Thanks.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: pocc preprocessor warnings not emitted on stderr
« Reply #3 on: August 19, 2007, 10:32:32 PM »
A much better idea IMO is to add a /P option, preprocess to <srcfile>.i, like in MSVC and other compilers. The stderr stream may be useful on u**x, but I have never found it the least bit useful under Windows.
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: pocc preprocessor warnings not emitted on stderr
« Reply #4 on: August 20, 2007, 09:49:52 AM »
Yes it's Ok for me too.
Thanks Pelle.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide