[Rose-public] Bug with -rose:unparse_includes - comments get mangled, causing backend failure

Phil Miller mille121 at illinois.edu
Thu Sep 12 20:22:21 PDT 2013


Using the edg4x branch, I'm seeing multiline C-style comments end up with
the first line prepended with //, such that the comment-opening /* ends up
not taking effect. Thus, the backend compiler attempts to read any
subsequent lines of the block comment as if it were code.

This may occur on the mainline, but builds take sufficiently long that I'm
not motivated to try it.

# Program - simple identity translator
$ cat tester.C
#include <rose.h>

int main(int argc, char** argv) {
  SgProject* project = frontend(argc, argv);
  return backend(project);
}

# Input fed to program
$ cat input.c
int bar;

/* Test A
  test b
  test c
*/

int foo;

int main()
{
  return 0;
}

# Test without -rose:unparse_includes
$ ./tester input.c
# executable 'input' is built as expected, with no prints

# Test with -rose_unparse_includes
$ ./tester -rose:unparse_includes input.c
[snip lots of warnings about built-ins]
rose_input.c:422: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'b'

$ cat rose_input.c
[snip all built-ins declarations]
int bar;
*// /* Test A*
  test b
  test c
*/
int foo;

int main()
{
  return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nersc.gov/pipermail/rose-public/attachments/20130912/cf62fb99/attachment.html>


More information about the rose-public mailing list