Pour obtenir une clé
d'essai remplissez le formulaire ci-dessous
Demandez des tariffs
Nouvelle licence
Renouvellement de licence
--Sélectionnez la devise--
USD
EUR
RUB
* En cliquant sur ce bouton, vous acceptez notre politique de confidentialité

Free PVS-Studio license for Microsoft MVP specialists
To get the licence for your open-source project, please fill out this form
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

I am interested to try it on the platforms:
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

Votre message a été envoyé.

Nous vous répondrons à


Si vous n'avez toujours pas reçu de réponse, vérifiez votre dossier
Spam/Junk et cliquez sur le bouton "Not Spam".
De cette façon, vous ne manquerez la réponse de notre équipe.

>
>
>
Preprocessed *.i file

Preprocessed *.i file

11 Mar 2013

A preprocessed *.i file is an output of the C or C++ preprocessor. It is usually this extension which is characteristic of files created as the preprocessor output. The preprocessor performs primary transformations of the source program text using only lexical analysis.

The preprocessor carries out the following operations:

  • Inclusion of header files (the '#include' instruction);
  • Macros substitution (the '#define' instruction);
  • Conditional compilation (instructions '#if', '#ifdef', '#else', '#elif', '#endif').

The preprocessor can be used as an auxiliary tool to assist static code analysis. The PVS-Studio static analyzer, for example, can use three different preprocessors (MSVC, Clang, C++Builder), and which of them is chosen to be used for a particular project depends on the type of the project or file. This procedure is necessary because the core of the analyzer is the code parsing library VivaCore that doesn't possess an integrated preprocessor. The necessity of primary preprocessing of source files is determined by the fact that all the instructions '#include' and '#define' should be expanded to enable good static analysis.

You can get a preprocessed file in the MSVC environment by defining the value of the 'Generate Preprocessed File' property on the 'C/C++\Preprocessor' tab as shown in Figure 1.

preprocessed_i_file/image1.webp

To get a preprocessed file using the GCC compiler you need to add the parameters '-E -o file_name.i' into its call.

References

Comments (0)

Next comments
Unicorn with delicious cookie
Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter