Skip to content

Add language identifiers #1788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Binary representation of floating-point values affects the precision and accurac

## Example

```
```c
// Floating-point_number_precision.c
// Compile options needed: none. Value of c is printed with a decimal
// point precision of 10 and 6 (printf rounded value by default) to
Expand Down
2 changes: 1 addition & 1 deletion docs/c-language/goto-and-labeled-statements-c.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ It is good programming style to use the **break**, **continue**, and `return` st

This example demonstrates the `goto` statement:

```
```c
// goto.c
#include <stdio.h>

Expand Down
2 changes: 1 addition & 1 deletion docs/c-language/one-dimensional-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ postfix-expression [ expression ]

Usually, the value represented by *postfix-expression* is a pointer value, such as an array identifier, and *expression* is an integral value. However, all that is required syntactically is that one of the expressions be of pointer type and the other be of integral type. Thus the integral value could be in the *postfix-expression* position and the pointer value could be in the brackets in the *expression*, or "subscript," position. For example, this code is legal:

```
```c
// one_dimensional_arrays.c
int sum, *ptr, a[10];
int main() {
Expand Down
2 changes: 1 addition & 1 deletion docs/c-language/parsing-c-command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This list illustrates the rules above by showing the interpreted result passed t

### Code

```
```c
// Parsing_C_Commandline_args.c
// ARGS.C illustrates the following variables used for accessing
// command-line arguments and environment variables:
Expand Down
2 changes: 1 addition & 1 deletion docs/c-language/summary-of-lifetime-and-visibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The following example illustrates blocks, nesting, and visibility of variables:

### Code

```
```c
// Lifetime_and_Visibility.c

#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/cgets-cgetws.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For more compatibility information, see [Compatibility](../c-runtime-library/com

## Example

```
```c
// crt_cgets.c
// compile with: /c /W3
// This program creates a buffer and initializes
Expand Down
4 changes: 2 additions & 2 deletions docs/c-runtime-library/exec-wexec-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The `_exec` calls do not preserve the translation modes of open files. If the ne

## Example

```
```c
// crt_args.c
// Illustrates the following variables used for accessing
// command-line arguments and environment variables:
Expand Down Expand Up @@ -102,7 +102,7 @@ char **envp ) // Array of environment variable strings

Run the following program to execute Crt_args.exe:

```
```c
// crt_exec.c
// Illustrates the different versions of exec, including
// _execl _execle _execlp _execlpe
Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/filename-search-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Functions `_findfirst32i64`, `_findnext32i64`, `_wfindfirst32i64`, and `_wfindne

## Example

```
```c
// crt_find.c
// This program uses the 32-bit _find functions to print
// a list of all files (and their attributes) with a .C extension
Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/gets-getws.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ For additional compatibility information, see [Compatibility](../c-runtime-libra

## Example

```
```c
// crt_gets.c
// compile with: /WX /W3

Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/heapset.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ For more compatibility information, see [Compatibility](../c-runtime-library/com

## Example

```
```c
// crt_heapset.c
// This program checks the heap and
// fills in free entries with the character 'Z'.
Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/pgmptr-wpgmptr.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ When a program is not run from the command line, `_pgmptr` might be initialized

The following program demonstrates the use of `_pgmptr`.

```
```c
// crt_pgmptr.c
// compile with: /W3
// The following program demonstrates the use of _pgmptr.
Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/spawn-wspawn-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ If you are calling `_spawn` from a DLL or a GUI application and want to redirect

## Example

```
```c
// crt_spawn.c
// This program accepts a number in the range
// 1-8 from the command line. Based on the number it receives,
Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/to-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The `towlower` and `towupper` functions return a converted copy of `c` if and on

## Example

```
```c
// crt_toupper.c
/* This program uses toupper and tolower to
* analyze all characters between 0x0 and 0x7F. It also
Expand Down
2 changes: 1 addition & 1 deletion docs/c-runtime-library/truncate.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The following functions return the number of characters copied if no truncation

## Example

```
```c
// crt_truncate.c
#include <stdlib.h>
#include <errno.h>
Expand Down
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-errors-1/compiler-error-c2032.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The structure or union has a member function, which is allowed in C++ but not in

The following sample generates C2032:

```
```c
// C2032.c
struct z {
int i;
Expand All @@ -23,10 +23,10 @@ struct z {

Possible resolution:

```
```c
// C2032b.c
// compile with: /c
struct z {
int i;
};
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ An operation on `identifier` requires the size of the data object, which cannot

The following sample generates C2036.

```
```c
// C2036.c
// a C program
struct A* pA;
Expand Down
4 changes: 2 additions & 2 deletions docs/error-messages/compiler-errors-1/compiler-error-c2053.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ The wide string is assigned to an incompatible type.

The following sample generates C2053:

```
```c
// C2053.c
int main() {
char array[] = L"Rika"; // C2053
}
```
```
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-errors-1/compiler-error-c2054.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ This error can be caused by omitting an equal sign (=) on a complex initializati

The following sample generates C2054:

```
```c
// C2054.c
int array1[] { 1, 2, 3 }; // C2054, missing =
```

Possible resolution:

```
```c
// C2054b.c
int main() {
int array2[] = { 1, 2, 3 };
}
```
```
4 changes: 2 additions & 2 deletions docs/error-messages/compiler-errors-1/compiler-error-c2055.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ A function definition contains a parameter type list instead of a formal paramet

The following sample generates C2055:

```
```c
// C2055.c
// compile with: /c
void func(int, char) {} // C2055
void func (int i, char c) {} // OK
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int main() {

C has more restrictive rules for constant expressions. The following sample generates C2057 and shows how to fix it:

```
```c
// C2057b.c
#define ArraySize1 10
int main() {
Expand Down
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-errors-1/compiler-error-c2063.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The identifier is used as a function but not declared as a function.

The following sample generates C2063:

```
```c
// C2063.c
int main() {
int i, j;
Expand All @@ -23,11 +23,11 @@ int main() {

Possible resolution:

```
```c
// C2063b.c
int i() { return 0;}
int main() {
int j;
j = i();
}
```
```
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-errors-1/compiler-error-c2075.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There were no curly braces around the specified array initializer.

The following sample generates C2075:

```
```c
// C2075.c
int main() {
int i[] = 1, 2, 3 }; // C2075
Expand All @@ -22,9 +22,9 @@ int main() {

Possible resolution:

```
```c
// C2075b.c
int main() {
int j[] = { 1, 2, 3 };
}
```
```
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-errors-1/compiler-error-c2081.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ This error can be caused by using the old style for the formal parameter list. Y

The following sample generates C2081:

```
```c
// C2081.c
void func( int i, j ) {} // C2081, no type specified for j
```

Possible resolution:

```
```c
// C2081b.c
// compile with: /c
void func( int i, int j ) {}
```
```
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-errors-1/compiler-error-c2085.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ The identifier was declared in a function definition but not in the formal param

The following sample generates C2085:

```
```c
// C2085.c
void func1( void )
int main( void ) {} // C2085
```

Possible resolution:

```
```c
// C2085b.c
void func1( void );
int main( void ) {}
```

With the semicolon missing, `func1()` looks like a function definition, not a prototype, so `main` is defined within `func1()`, generating Error C2085 for identifier `main`.
With the semicolon missing, `func1()` looks like a function definition, not a prototype, so `main` is defined within `func1()`, generating Error C2085 for identifier `main`.
4 changes: 2 additions & 2 deletions docs/error-messages/compiler-errors-1/compiler-error-c2088.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The operator was not defined for the structure or union. This error is only vali

The following sample generates C2088 three times:

```
```c
// C2088.c
struct S {
int m_i;
Expand All @@ -24,4 +24,4 @@ int main() {
struct S s2 = +s; // C2088
s++; // C2088
}
```
```
4 changes: 2 additions & 2 deletions docs/error-messages/compiler-errors-1/compiler-error-c2093.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ When compiling with [/Za](../../build/reference/za-ze-disable-language-extension

The following sample generates C2093:

```
```c
// C2093.c
// compile with: /Za /c
void func() {
Expand All @@ -24,4 +24,4 @@ void func() {
static int li2;
int * s2[]= { &li2 };
}
```
```
6 changes: 3 additions & 3 deletions docs/error-messages/compiler-errors-1/compiler-error-c2099.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This error is issued only by the C compiler and occurs only for non-automatic va

The following sample generates C2099.

```
```c
// C2099.c
int j;
int *p;
Expand All @@ -34,9 +34,9 @@ For more information, see [/fp (Specify Floating-Point Behavior)](../../build/re

The following sample generates C2099.

```
```c
// C2099_2.c
// compile with: /fp:strict /c
float X = 2.0 - 1.0; // C2099
float X2 = 1.0; // OK
```
```
4 changes: 2 additions & 2 deletions docs/error-messages/compiler-errors-1/compiler-error-c2142.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ One declaration of the function contains a variable parameter list. Another decl

The following sample generates C2142:

```
```c
// C2142.c
// compile with: /Za /c
void func();
void func( int, ... ); // C2142
void func2( int, ... ); // OK
```
```
4 changes: 2 additions & 2 deletions docs/error-messages/compiler-errors-1/compiler-error-c2164.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An `intrinsic` pragma uses an undeclared function (only occurs with **/Oi**). Or

The following sample generates C2164:

```
```c
// C2164.c
// compile with: /c
// processor: x86
Expand All @@ -22,4 +22,4 @@ The following sample generates C2164:
void b(float *p) {
_mm_load_ss(p); // C2164
}
```
```
Loading