Frama-C Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002348Frama-CPlug-in > clangpublic2018-01-30 16:312018-01-30 18:03
Reporterjens 
Assigned Tovirgile 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002348: unknown variable in contract is not treated as an error
DescriptionThe attached C/C++ code is treated differently by Frama-C and Frama-Clang
The C file 'unknown_variable.c' is correctly rejected by Frama-C with wit the the message

    frama-c -wp -wp-rte unknown_variable.c

   [kernel] user error: stopping on file "unknown_variable.c" that has errors. Add
    '-kernel-msg-key pp' for preprocessing command.

When processing this file as C++ code

   frama-c -wp -wp-rte unknown_variable.cpp

Frama-Clang only emits a warning (by the kernel) and continues processing

   Parsing unknown_variable.cpp (external front-end)
unknown_variable.cpp:6:18: unknown identifier 'c'
Now output intermediate result

In my opinion, the C++ contract should be rejected as well.

TagsNo tags attached.
Attached Filesc file icon unknown_variable.c [^] (88 bytes) 2018-01-30 16:31 [Show Content]
cpp file icon unknown_variable.cpp [^] (88 bytes) 2018-01-30 16:31

- Relationships

-  Notes
(0006512)
virgile (developer)
2018-01-30 18:03

If I'm not mistaken, Frama-Clang implements the old "continue-annot-error" behavior, but nevertheless the warning should have come from the plug-in, not the kernel.

- Issue History
Date Modified Username Field Change
2018-01-30 16:31 jens New Issue
2018-01-30 16:31 jens Status new => assigned
2018-01-30 16:31 jens Assigned To => virgile
2018-01-30 16:31 jens File Added: unknown_variable.c
2018-01-30 16:31 jens File Added: unknown_variable.cpp
2018-01-30 18:03 virgile Note Added: 0006512


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker