~ubuntu-branches/ubuntu/wily/aspectc++/wily

« back to all changes in this revision

Viewing changes to Puma/gen-release/step1/src/CSemVisitor.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-06-15 10:17:02 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090615101702-qsr30iptwbxylmo2
Tags: 1.0pre4~svn.20090615-1
* New upstream release.
* don't ignore errors in the postrm script
* avoid spurious creation of empty dir ./usr/sbin/
* improve short descriptions of libpuma-doc and libpuma-dev
* bump Standards-Version to 3.8.1
* bump debhelper compat level to level 7 (latest in stable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
329
329
    t2 = resolveExpr (node->Expr (), node);
330
330
    expr = node->Expr ();
331
331
    if (t1->isVoid ()) 
332
 
      SEM_ERROR (node, "`return' with a value, in function returning void");
 
332
      SEM_WARNING (node, "`return' with a value, in function returning void");
333
333
    else {
334
334
      v = expr->Value () ? expr->Value ()->Constant () : 0;
335
335
      if (t1->isScalar ()) {
345
345
                      (t2->isRestrict () ? t1->isRestrict () : true)) &&
346
346
                   ! (t1->isPointer () && t2->isInteger () && v && v->isNull ()) &&
347
347
                   ! (t1->VirtualType ()->is_bool () && t2->isPointer ())) {
348
 
          SEM_ERROR (node, "incompatible types in `return' statement");
 
348
          SEM_WARNING (node, "incompatible types in `return' statement");
349
349
        } else if (! CSemExpr::compatible (t1, t2))
350
350
          CSemExpr::cast_to (t1, expr, node);
351
351
      } else if (t1->isRecord ()) {
352
352
        if (! CSemExpr::compatible (t1, t2))
353
 
          SEM_ERROR (node, "incompatible types in `return' statement");
 
353
          SEM_WARNING (node, "incompatible types in `return' statement");
354
354
      } else
355
355
        SEM_ERROR (node, "invalid return type");
356
356
    }