c++/7679: The compiler crashes wen a right parentesis is missing
bmello@us.ibm.com
bmello@us.ibm.com
Wed Aug 21 17:43:00 GMT 2002
>Number: 7679
>Category: c++
>Synopsis: The compiler crashes wen a right parentesis is missing
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 21 17:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Bernardo Mello
>Release: 3.1
>Organization:
IBM T.J. Watson Research Center
>Environment:
System: Linux localhost.localdomain 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /tmp/gcc-3.1/configure
>Description:
When I try to compile the code bellow using the command g++ teste.cpp the compiler crashes if one parentesis is missing in the end of the definition of the function double occupancy(int m).
>How-To-Repeat:
Compile the program below using g++. There is a missing parentesis in the end
of the line
{return L/(L+Ka*activity(m,1,activity())+Ki*(1-activity(m,1,activity()));}
that make the compiler crash.
const int n_methyl=2;
const double tiny=1e-10;
class receptors
{
public:
static double C,E[n_methyl][2],Ka,Ki,L,fm[n_methyl];
double x[10];
receptors(){};
double activity() {return x[0];}
double activity(int,int,double);
double occupancy(int m)
{return L/(L+Ka*activity(m,1,activity())+Ki*(1-activity(m,1,activity()));}
double occupancy()
{double s=0; for(int m=0;m!=n_methyl;m++)s+=occupancy(m)*fm[m]; return s;}
double methylation()
{double s=0;for(int m=0;m!=n_methyl;m++) s+=m*fm[m]; return s;}
void tune_fm(double);
double show();
void find_solution(double);
};
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list