Jon Stewart on Thu, 23 Sep 2004 03:10:28 -0500 (CDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[ALACPP] compilation error


I have some code which expands in the preprocessor as such:

void testFunction(void) {
  class MyException {
    void *whatever;
  };

  try {
    throw MyException;
    throw SomeOtherKnownGoodExceptionType("message");
  }
  catch(MyException e) {
    ;
  }
}

This does not compile in gcc 3.4.2. I get:
	"error: expected primary-expression before ';' token"


The cpp output sure looks okay to me! But note the hour...

If I change it to:

void testFunction(void) {
  try {
    throw int(1);
    throw SomeOtherKnownGoodExceptionType("message");
  }
  catch(int i) {
    ;
  }
}

then everything works just fine and dandy.

Am I screwing up the embedded class? Is gcc?



Jon
-- 
Jon Stewart                                 Advanced Los Angeles C++
stew1@xxxxxxxxxxx                           http://www.alacpp.org
_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp