boostorg / wave

Boost.org wave module
http://boost.org/libs/wave
21 stars 49 forks source link

No output showing macro expansion from the wave.exe program in the 'develop' branch #95

Closed eldiener closed 4 years ago

eldiener commented 4 years ago

After building the latest wave in 'develop' and using the wave.exe to see a macro expansion, the -t option produces a file with absolutely no macro exdpansio at all, while the output from the wave.exe produces a files showing the correct final output. This breaks wave.exe ability to show the steps of a macro's expansion, which I have used innumrable times in the past. Yes I am using wave.exe correctly with a:

#pragma wave trace(enable)

and a

#pragma wave trace(disable)

surrounding the macro whose expansion i want to see. Please fix this !

jefftrull commented 4 years ago

Wow! We must have broken something. Do you have a small test case? Thanks.

jefftrull commented 4 years ago

I just did a fresh build of the wave tool based on develop. The following input:

#define FOO(X) something X something
#define BAR(X) FOO(X) , FOO(X)

#pragma wave trace(enable)
FOO(words)
#pragma wave trace(disable)

produces this output:

/tmp/test_wave.cpp:5:1: FOO(words)
  /tmp/test_wave.cpp:1:9: see macro definition: FOO(X)
  invoked with
  [
    X = words
  ]
  [
    something words something
    rescanning
    [
      something words something
    ]
  ]
#line 5 "/tmp/test_wave.cpp"
something words something

So to me, it looks like it's working... maybe there's an issue specific to your input?

eldiener commented 4 years ago

Can you give me your wave command line ?

jefftrull commented 4 years ago

Sure! it's just: wave -t - /tmp/test_wave.cpp

but if you can reproduce this problem in a small test case, it might be best just to post it and I can get started...

eldiener commented 4 years ago

Try:

wave -tsomefile /tmp/test_wave.cpp

and see if you get the output in 'somefile'.

jefftrull commented 4 years ago

Yes, they appear there as well. Can you give us a testcase?

eldiener commented 4 years ago

It was a problem with my editor and the size of the file that was produced. My editor was showing an empty file, when I tried to view the file in mu editor, even though the file was populated with output, When I gave my editor enough time to display the file, since it was very large, it would finally show the contents. I apologize for the issue report and my own error.