Project

General

Profile

Actions

Bug #5314

open

Invalid type encountered (hidden by variable name)

Added by Vadim Mutilin over 9 years ago. Updated about 8 years ago.

Status:
Open
Priority:
High
Category:
C back-end
Start date:
10/07/2014
Due date:
% Done:

0%

Estimated time:
Detected in build:
2c42610
Platform:
Published in build:

Description

For the code

         ax25_dev *ax25_dev;
         ...
         if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL)
                 goto free;

C-Backend generates

  ax25_dev *ax25_dev;
  # 232 "net/ax25/ax25_in.o.c.prepared" 
  ...
  # 234 "net/ax25/ax25_in.o.c.prepared" 
  if (( ax25_dev = ax25_dev_ax25dev ( dev ) ) == ( ( ax25_dev *) 0 ))
    goto free;

GCC error:

net/ax25/ax25_in.o.c.prepared: In function ‘ax25_rcv’:
net/ax25/ax25_in.o.c.prepared:234:64: error: expected expression before ‘)’ token

CPAchecker fails with

Error: Parsing failed (Invalid type encountered in: ax25_dev  in line 65224: ax25_dev (full line is if (( ax25_dev = ax25_dev_ax25dev ( dev ) ) == ( ( ax25_dev *) 0 ))
    goto free;)) (EclipseCParser.buildCFA, SEVERE)

32_7a, linux-3.17-rc1, net/ax25/ax25.ko

Actions

Also available in: Atom PDF