On Wed, 2011-09-28 10:29:58 -0700, Shelley Dong wrote: > Hello there, > > We are currently using Splint to do static analysis on the code generated by > RTW from Simulink models. There are some preprocessing code auto generated to > error out the compiling process when certain conditions are true, usually > boundary checks. Splint was not able to preprocess and produce errors. I > attached one of them below. We are wondering if anybody else ever reported > similar issues and if Splint works fine with auto generated code. Thanks for > your answer. - Shelley > > C:\...\ HVCM_private.h (35, > 440): #error "Code was generated for compiler with different sized > ushort/short. Consider adjusting Emulation Hardware word size settings on > the Hardware Implementation pane to match your compiler word sizes as > defined in the compilers limits.h header file. Alternatively, you can > select 'None' for Emulation Hardware and select the 'Enable portable word > sizes' option for ERT based targets, this will disable the preprocessor > word size checks." > Preprocessing error. (Use -preproc to inhibit warning)
Shelley, This has nothing to do with the code being auto-generated or not. Splint hits an #error directive in your code, probably due to running with a different set of (pre-) defined symbols than your compiler. You'll have to look at line 35 of HVCM_private.h to figure out what's going wrong and to determine a set of symbols that makes splint take the same code paths than your compiler. HTH, Ludolf -- --------------------------------------------------------------- Ludolf Holzheid Tel: +49 621 339960 Bihl+Wiedemann GmbH Fax: +49 621 3392239 Floßwörthstraße 41 e-mail: lholzh...@bihl-wiedemann.de D-68199 Mannheim, Germany --------------------------------------------------------------- _______________________________________________ splint-discuss mailing list splint-discuss@mail.cs.virginia.edu http://www.cs.virginia.edu/mailman/listinfo/splint-discuss