From Parts
Jump to: navigation, search

How to generate a bug report

It is very useful to generate a standalone test case to reproduce C/C++ bugs. Here is how:

Let's say this doesn't work with XL:


The following should generate a standalone file:


One should be able to reproduce the bug using only the following:


This eliminates the need to include external header dependency in C/C++ code. I know of no equivalent for Fortran.



bgxlC_r -I/bgsys/drivers/ppcfloor/ -c builtins.C 

Should generate the same result as this:

bgxlC_r -I/bgsys/drivers/ppcfloor/ -E builtins.C >& builtins.i
bgxlC_r -c builtins.i

False Warnings

Ignore warnings like this:

The pragma GCC system_header directive is only permitted in an include file. The pragma will be ignored.
Personal tools