Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

Remove the comments generated by cpp

$
0
0

I use #include ".../frontend/tokens.mll" in lexer.mll, and then cpp -C -P frontend/lexer.mll -o frontend/lexer_new.mll to generate lexer_new.mll.

That worked until I upgraded my ubuntu from 12.04 to 14.04 yesterday.

The compilation gives an error:

ocamllex frontend/lexer_new.mll
File "frontend/lexer_new.mll", line 1, character 1: illegal character /.
make: *** [frontend/lexer_new.ml] Error 3

That is because in lexer_new.mll several lines of C comments have been inserted in the beginning:

/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.
   ... */

I don't remember if same comments were generated before upgrading.

Does anyone know how to get ride of these comments?

PS: the gcc version is : gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)


Viewing all articles
Browse latest Browse all 22113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>