]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
c-omp.c (c_omp_check_context_selector): Add nvidia to the list of valid vendors.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
b2417b59
JJ
12019-11-14 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.c (c_parser_omp_context_selector): Rename
4 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
5 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
6 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
7 and string literals.
8
4e03c3a7
JM
92019-11-14 Joseph Myers <joseph@codesourcery.com>
10
11 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
12 ctsk_tagfirstref_attrs.
13 (struct c_declspecs): Update description of attrs. Add
14 postfix_attrs and non_std_attrs_seen_p. Increase size of
15 typespec_kind bit-field.
16 (c_warn_unused_attributes): New declaration.
17 (parser_xref_tag): Update prototype.
18 * c-decl.c (c_warn_unused_attributes): New function.
19 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
20 ctsk_tagref_attrs. Handle attribute declarations.
21 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
22 (grokdeclarator): Handle standard attributes.
23 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
24 attributes to incomplete type reference.
25 (xref_tag): Update call to parser_xref_tag.
26 (declspecs_add_addrspace, declspecs_add_type)
27 (declspecs_add_scspec, declspecs_add_attrs): Set
28 non_std_attrs_seen_p.
29 (finish_declspecs): Apply postfix standard attributes to type.
30 * c-parser.c (c_token_starts_declspecs)
31 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
32 (c_parser_next_tokens_start_declaration): Update comments.
33 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
34 parser->tokens[2] to parser->tokens[1].
35 (c_parser_nth_token_starts_std_attributes)
36 (c_parser_std_attribute_specifier_sequence): New functions.
37 (c_parser_declaration_or_fndef): Add arguments have_attrs and
38 attrs. All callers changed. Handle standard attributes.
39 (c_parser_parms_declarator, c_parser_parms_list_declarator)
40 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
41 All callers changed.
42 (c_parser_declspecs): Add arguments start_std_attr_ok and
43 end_std_attr_ok. All callers changed. Handle standard
44 attributes.
45 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
46 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
47 (c_parser_compound_statement_nostart, c_parser_all_labels)
48 (c_parser_label, c_parser_statement, c_parser_for_statement):
49 Handle standard attributes.
50 * c-parser.h (c_parser_declspecs): Update prototype.
51 * gimple-parser.c (c_parser_gimple_declaration): Update call to
52 c_parser_declspecs.
53
0c29cac4
ML
542019-11-12 Martin Liska <mliska@suse.cz>
55
56 * gimple-parser.c: Do not include params.h.
57
028d4092
ML
582019-11-12 Martin Liska <mliska@suse.cz>
59
60 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
61 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
62 macro.
63
62aee289
MR
642019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
65 Frederik Harwath <frederik@codesourcery.com>
66
67 gcc/c/
68 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
69 (c_parser_oacc_kernels_parallel): Rename function to...
70 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
71 (c_parser_omp_construct): Update accordingly.
72
73
7cec9588
JJ
742019-11-11 Jakub Jelinek <jakub@redhat.com>
75
76 * c-parser.c (c_parser_translation_unit): Diagnose declare target
77 without corresponding end declare target.
78
f486280c
RS
792019-11-08 Richard Sandiford <richard.sandiford@arm.com>
80
81 * c-convert.c (convert): Only handle vector conversions if one of
82 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
83 allows it.
84 * c-typeck.c (build_array_ref): Only allow vector indexing if the
85 vectors satisfy gnu_vector_type_p.
86 (build_unary_op): Only allow unary operators to be applied to
87 vectors if they satisfy gnu_vector_type_p.
88 (digest_init): Only allow by-element initialization of vectors
89 if they satisfy gnu_vector_type_p.
90 (really_start_incremental_init): Likewise.
91 (push_init_level): Likewise.
92 (pop_init_level): Likewise.
93 (process_init_element): Likewise.
94 (build_binary_op): Only allow binary operators to be applied to
95 vectors if they satisfy gnu_vector_type_p.
96
017c6491
JM
972019-11-08 Joseph Myers <joseph@codesourcery.com>
98
99 * c-decl.c (grokparms): Convert () in a function definition to
100 (void) for C2x.
101 (store_parm_decls_oldstyle): Pedwarn for C2x.
102 (store_parm_decls): Update comment about () not generating a
103 prototype.
104
c01bd174
JM
1052019-11-07 Joseph Myers <joseph@codesourcery.com>
106
107 * c-parser.c (c_parser_attribute_arguments): New function.
108 Factored out of c_parser_gnu_attribute.
109 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
110 (c_parser_balanced_token_sequence, c_parser_std_attribute)
111 (c_parser_std_attribute_specifier): New functions.
112 (c_parser_transaction_attributes): Use
113 c_parser_std_attribute_specifier.
114
471c5330
JM
1152019-11-07 Joseph Myers <joseph@codesourcery.com>
116
117 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
118 lex_joined_string and translate_strings_p.
119 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
120 c_lex_with_flags.
121 (c_parser_string_literal): New function.
122 (c_parser_static_assert_declaration_no_semi): Use
123 c_parser_string_literal. Do not set lex_untranslated_string.
124 (c_parser_asm_string_literal): Use c_parser_string_literal.
125 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
126 (c_parser_gnu_attributes): Set and restore translate_strings_p
127 instead of lex_untranslated_string.
128 (c_parser_asm_statement): Do not set lex_untranslated_string.
129 (c_parser_asm_operands): Likewise.
130 (c_parser_has_attribute_expression): Set and restore
131 translate_strings_p instead of lex_untranslated_string.
132 (c_parser_postfix_expression): Use c_parser_string_literal.
133 (pragma_lex): Likewise.
134 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
135 (c_parse_file): Set translate_strings_p.
136 * gimple-parser.c (c_parser_gimple_postfix_expression)
137 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
138 * c-parser.c (c_parser_string_literal): Declare function.
139
d0c464d2
JJ
1402019-11-02 Jakub Jelinek <jakub@redhat.com>
141
142 * c-parser.c (c_finish_omp_declare_variant): Use
143 omp_get_context_selector instead of c_omp_get_context_selector.
144
ac2cfa6c
RS
1452019-10-29 Richard Sandiford <richard.sandiford@arm.com>
146
147 * c-tree.h (c_simulate_enum_decl): Declare.
148 * c-decl.c (c_simulate_enum_decl): New function.
149 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
150
74078538
RS
1512019-10-29 Richard Sandiford <richard.sandiford@arm.com>
152
153 * c-tree.h (c_simulate_builtin_function_decl): Declare.
154 * c-decl.c (c_simulate_builtin_function_decl): New function.
155 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
156 to the above.
157
ad1539d5
MS
1582019-10-28 Martin Sebor <msebor@redhat.com>
159
160 PR c/66970
161 * c-decl.c (names_builtin_p): Define a new function.
162
cb73e4e7
RB
1632019-10-28 Richard Biener <rguenther@suse.de>
164
165 PR c/92249
166 * gimple-parser.c (c_parser_parse_gimple_body): Make
167 current_bb the entry block initially to easier recover
168 from errors.
169 (c_parser_gimple_compound_statement): Adjust.
170
135df52c
JJ
1712019-10-24 Jakub Jelinek <jakub@redhat.com>
172
173 * c-parser.c (c_finish_omp_declare_variant): Use
174 omp_context_selector_matches instead of
175 c_omp_context_selector_matches.
176 * c-decl.c (c_decl_attributes): Add "omp declare target block"
177 attribute in between declare target and end declare target
178 pragmas.
179
783bfe5e
JM
1802019-10-15 Joseph Myers <joseph@codesourcery.com>
181
182 * c-parser.c (c_parser_attribute_any_word): Rename to
183 c_parser_gnu_attribute_any_word. All callers changed.
184 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
185 callers changed.
186 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
187 callers changed.
188 (c_parser_declaration_or_fndef, c_parser_declspecs)
189 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
190 (c_parser_struct_declaration, c_parser_declarator)
191 (c_parser_gnu_attribute, c_parser_compound_statement)
192 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
193 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
194 attribute-related syntax productions.
195
56898e43
RS
1962019-10-14 Richard Sandiford <richard.sandiford@arm.com>
197
198 * c-objc-common.c (useful_aka_type_p): Replace with...
199 (get_aka_type): ...this new function. Given the original type,
200 decide which aka type to print (if any). Only look through typedefs
201 if user_facing_original_type_p.
202 (print_type): Update accordingly.
203
b9424661
JJ
2042019-10-14 Jakub Jelinek <jakub@redhat.com>
205
206 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
207 into int NESTED, if it is 2, diagnose missing commas in between
208 clauses.
209 (c_parser_omp_context_selector): Pass 2 as last argument to
210 c_parser_omp_all_clauses.
211
20de9568
JJ
2122019-10-12 Jakub Jelinek <jakub@redhat.com>
213
214 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
215 For simd properties, put them directly into TREE_VALUE.
216 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
217 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
218 add "omp declare variant base" attribute rather than
219 "omp declare variant".
220
fe2bc27c
JM
2212019-10-11 Joseph Myers <joseph@codesourcery.com>
222
223 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
224
94e7f906
JJ
2252019-10-10 Jakub Jelinek <jakub@redhat.com>
226
227 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
228 true, terminate processing on closing paren and don't skip to end of
229 pragma line.
230 (c_parser_omp_declare_simd): Handle also declare variant.
231 (omp_construct_selectors, omp_device_selectors,
232 omp_implementation_selectors, omp_user_selectors): New variables.
233 (c_parser_omp_context_selector,
234 c_parser_omp_context_selector_specification,
235 c_finish_omp_declare_variant): New functions.
236 (c_finish_omp_declare_simd): Handle both declare simd and
237 declare variant.
238 (c_parser_omp_declare): Handle declare variant.
239
93313b94
JM
2402019-10-02 Joseph Myers <joseph@codesourcery.com>
241
242 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
243 CPP_COLON tokens.
244
55879815
RS
2452019-10-01 Richard Sandiford <richard.sandiford@arm.com>
246
247 * c-objc-common.c (useful_aka_type_p): New function.
248 (print_type): Use it to decide whether an aka type is worth printing.
249
59bc434a
JJ
2502019-09-27 Jakub Jelinek <jakub@redhat.com>
251
252 PR c++/88203
253 * c-parser.c (c_parser_predefined_identifier): New function.
254 (c_parser_postfix_expression): Use it.
255 (c_parser_omp_variable_list): Parse predefined identifiers.
256 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
257 in shared and firstprivate clauses, even when they are predetermined
258 shared.
259
c6447c20
RS
2602019-09-27 Richard Sandiford <richard.sandiford@arm.com>
261
262 * c-typeck.c (build_function_call_vec): Take the original function
263 decl as an optional final parameter. Pass all built-in calls to
264 check_builtin_function_arguments.
265
522da4c2
EB
2662019-09-20 Eric Botcazou <ebotcazou@adacore.com>
267
268 PR c/91815
269 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
270 of identifiers in the external scope only for variables and functions.
271
68e2c199
PK
2722019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
273
274 PR c/78736
275 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
276
22f8849d
IS
2772019-08-23 Iain Sandoe <iain@sandoe.co.uk>
278
279 PR pch/61250
280 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
281 after determining that the first token is not
282 PRAGMA_GCC_PCH_PREPROCESS.
283
db376f45
EB
2842019-08-22 Eric Botcazou <ebotcazou@adacore.com>
285
286 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
287 FUNCTION_DECL to the right value in the presence of nested declarators.
288
4d732405
RS
2892019-08-13 Richard Sandiford <richard.sandiford@arm.com>
290
291 PR middle-end/91421
292 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
293
cb1180d5
RS
2942019-08-13 Richard Sandiford <richard.sandiford@arm.com>
295
296 PR middle-end/91421
297 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
298 of a built_in_function.
299 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
300
77eb117f
JJ
3012019-08-10 Jakub Jelinek <jakub@redhat.com>
302
303 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
304 (c_parser_omp_clause_device_type): New function.
305 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
306 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
307 (c_parser_omp_declare_target): Handle device_type clauses. Remove
308 diagnostics for declare target with clauses nested in clause-less
309 declare target declaration-definition-seq.
310 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
311
2c3b8bad
JJ
3122019-08-09 Jakub Jelinek <jakub@redhat.com>
313
bb522e2e
JJ
314 * c-parser.c (check_no_duplicate_clause): Simplify using
315 omp_find_clause.
316 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
317 directive name modifiers.
318 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
319
2c3b8bad
JJ
320 PR c/91401
321 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
322 check_no_duplicate_clause call. Comment it out, instead emit a
323 warning for duplicate dist_schedule clauses.
324
99769e7f
RS
3252019-08-08 Richard Sandiford <richard.sandiford@arm.com>
326
327 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
328
8860d270
JJ
3292019-08-08 Jakub Jelinek <jakub@redhat.com>
330
331 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
332 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
333 instead of generic_head to track duplicates.
334
398e3feb
JJ
3352019-08-07 Jakub Jelinek <jakub@redhat.com>
336
337 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
338 (c_parser_omp_clause_use_device_addr): New function.
339 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
340 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
341 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
342 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
343 map or use_device_* clauses.
344 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
345 in OpenMP, require pointer type rather than pointer or array type.
346 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
347
a28351e7
JJ
3482019-07-31 Jakub Jelinek <jakub@redhat.com>
349
350 PR c/91192
351 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
352 even if finish is UNKNOWN_LOCATION, just use start as finish in that
353 case.
354
6343b6bf
ML
3552019-07-25 Martin Liska <mliska@suse.cz>
356 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
357
358 PR c++/23383
359 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
360
cb50701e
ML
3612019-07-25 Martin Liska <mliska@suse.cz>
362
363 * c-decl.c (merge_decls): Use new macros
364 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
365
62e3e66f
RB
3662019-07-23 Richard Biener <rguenther@suse.de>
367
368 PR tree-optimization/83518
369 * gimple-parser.c (c_parser_parse_gimple_body): When we have
370 a CFG also rebuild cgraph edges.
371
554a530f
JJ
3722019-07-20 Jakub Jelinek <jakub@redhat.com>
373
374 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
375 (c_parser_omp_clause_bind): New function.
376 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
377 (OMP_LOOP_CLAUSE_MASK): Define.
378 (c_parser_omp_loop): New function.
379 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
380 loop combined with parallel or teams.
381 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
382 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
383
d119bf79
RS
3842019-07-18 Richard Sandiford <richard.sandiford@arm.com>
385
386 PR c/53633
387 * c-decl.c (finish_function): Check targetm.warn_func_return
388 before issuing a -Wreturn-type warning.
389
ab20d992 3902019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
391
392 * gimple-parser.c (c_parser_gimple_try_stmt): New.
393 (c_parser_compound_statement): Call it.
394
1fdd6f04
JJ
3952019-07-12 Jakub Jelinek <jakub@redhat.com>
396
397 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
398 (c_parser_omp_clause_order): New function.
399 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
400 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
401 PRAGMA_OMP_CLAUSE_ORDER.
402 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
403
8389386c
RB
4042019-07-10 Richard Biener <rguenther@suse.de>
405
406 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
407 _Literal (int *) &x for address literals.
408
99b1c316
MS
4092019-07-09 Martin Sebor <msebor@redhat.com>
410
411 PR c++/61339
412 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
413 to class.
414 (field_decl_cmp): Same.
415 * c-parser.c (c_parser_struct_or_union_specifier): Same.
416 * c-tree.h: Same.
417 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
418
6c1dae73
MS
4192019-07-09 Martin Sebor <msebor@redhat.com>
420
421 PR c++/61339
422 * c-decl.c: Change class-key from class to struct and vice versa
423 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
424 * gimple-parser.c: Same.
425
69b5279e
RB
4262019-07-01 Richard Biener <rguenther@suse.de>
427
428 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
429 _Literal (char *) &"foo" for address literals pointing to
430 STRING_CSTs.
431
ab20d992
JJ
4322019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
433
434 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
435 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
436 C incompatibility if alternate "__intN__" form is used.
437
1e3d475e
MS
4382019-06-24 Martin Sebor <msebor@redhat.com>
439
440 * c-typeck.c (build_binary_op): Hyphenate floating-point.
441
bf38f7e9
JJ
4422019-06-10 Jakub Jelinek <jakub@redhat.com>
443
444 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
445 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
446 (c_parser_omp_scan_loop_body): New function.
447 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
448 inscan reduction clauses.
449 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
450 non-inscan reductions on the same construct, or inscan reductions with
451 ordered or schedule clauses, or inscan array reductions.
452
65985d78
MS
4532019-06-05 Martin Sebor <msebor@redhat.com>
454
455 PR c/90737
456 * c-typeck.c (c_finish_return): Only consider functions returning
457 pointers as candidates for -Wreturn-local-addr.
458
0ecf545c
MS
4592019-06-05 Martin Sebor <msebor@redhat.com>
460
461 * c-decl.c (start_decl): Adjust quoting and hyphenation
462 in diagnostics.
463 (finish_decl): Same.
464 (finish_enum): Same.
465 (start_function): Same.
466 (declspecs_add_type): Same.
467 * c-parser.c (warn_for_abs): Same.
468 * c-typeck.c (build_binary_op): Same.
469
e03436e7
TS
4702019-05-17 Thomas Schwinge <thomas@codesourcery.com>
471
b48f44bf
TS
472 PR c/89433
473 * c-parser.c (c_finish_oacc_routine): Rework checking if already
474 marked with an OpenACC 'routine' directive.
475
5bf04509
TS
476 PR c/89433
477 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
478 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
479
e03436e7
TS
480 PR c/89433
481 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
482 clauses from "omp declare target" attribute.
483
a9c697b8
MS
4842019-05-16 Martin Sebor <msebor@redhat.com>
485
ab20d992
JJ
486 * c-decl.c (start_decl): Quote keywords, operators, and
487 types in diagnostics.
488 (finish_decl): Same.
489 * c-parser.c (c_parser_asm_statement): Same.
490 (c_parser_conditional_expression): Same.
491 (c_parser_transaction_cancel): Same.
492 * c-typeck.c (c_common_type): Same.
493 (build_conditional_expr): Same.
494 (digest_init): Same.
495 (process_init_element): Same.
496 (build_binary_op): Same.
a9c697b8 497
c4499192
RB
4982019-05-17 Richard Biener <rguenther@suse.de>
499
500 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
501 (c_parser_gimple_unary_expression): Likewise.
502 (c_parser_gimple_parentized_ternary_expression): New function.
503
adfe6e4b
RB
5042019-05-16 Richard Biener <rguenther@suse.de>
505
506 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
507 (c_parser_gimple_unary_expression): Likewise.
508
186dabf2
RB
5092019-05-15 Richard Biener <rguenther@suse.de>
510
511 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
512 __BIT_FIELD_REF.
513
1158c5b4
RB
5142019-05-14 Richard Biener <rguenther@suse.de>
515
516 * gimple-parser.c (c_parser_gimple_statement): Remove
517 questionable auto-promotion to VIEW_CONVERT_EXPR.
518 (c_parser_gimple_typespec): Split out from __MEM parsing.
519 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
520 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
521 as __VIEW_CONVERT with -gimple.
522
fd4485aa
ML
5232019-05-09 Martin Liska <mliska@suse.cz>
524
525 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
526 __MAX.
527 (c_parser_gimple_unary_expression): Parse also binary expression
528 __MIN and __MAX.
529 (c_parser_gimple_parentized_binary_expression): New function.
530
d276406a
ML
5312019-05-09 Martin Liska <mliska@suse.cz>
532
533 * gimple-parser.c (struct gimple_parser): Add probability.
534 for gimple_parser_edge.
535 (gimple_parser::push_edge): Add new argument probability.
536 (c_parser_gimple_parse_bb_spec): Parse also probability
537 if present.
538 (c_parser_parse_gimple_body): Set edge probability.
539 (c_parser_gimple_compound_statement): Consume token
540 before calling c_parser_gimple_goto_stmt.
541 Parse BB counts.
542 (c_parser_gimple_statement): Pass new argument.
543 (c_parser_gimple_goto_stmt): Likewise.
544 (c_parser_gimple_if_stmt): Likewise.
545 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
546 * c-parser.c (c_parser_declaration_or_fndef): Pass
547 hot_bb_threshold argument.
548 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
549 field.
550 (c_parser_gimple_parse_bb_spec_edge_probability): New.
551
f179b64e
JJ
5522019-04-26 Jakub Jelinek <jakub@redhat.com>
553
554 PR debug/90197
555 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
556 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
557 (c_parser_do_statement): Likewise.
558 (c_parser_for_statement): Likewise. Formatting fixes.
559 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
560 emit DEBUG_BEGIN_STMTs if needed.
561
e7178413
JJ
5622019-04-19 Jakub Jelinek <jakub@redhat.com>
563
c280b7ee
JJ
564 PR c/89888
565 * c-typeck.c (struct c_switch): Remove outside_range_p member.
566 (c_start_case): Don't clear it.
567 (do_case): Adjust c_add_case_label caller.
568 (c_finish_case): Adjust c_do_switch_warnings caller.
569
e7178413
JJ
570 PR c++/90108
571 * c-decl.c (merge_decls): If remove is main variant and
572 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
573 variant that has newdecl as TYPE_NAME if any.
574
60a2c645
JJ
5752019-04-12 Jakub Jelinek <jakub@redhat.com>
576
577 PR c/89933
578 * c-decl.c (merge_decls): When newdecl's type is its main variant,
579 don't try to remove it from the variant list, but instead assert
580 it has no variants.
581
2a82beaa
RB
5822019-04-01 Richard Biener <rguenther@suse.de>
583
584 PR c/71598
585 * c-tree.h (c_get_alias_set): Declare.
586 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
587 * c-objc-common.c (c_get_alias_set): Treat enumeral types
588 as the underlying integer type.
589
bec1da64
MS
5902019-03-19 Martin Sebor <msebor@redhat.com>
591
592 PR tree-optimization/89688
593 * c-decl.c (finish_decl): Call braced_lists_to_string for more
594 kinds of initializers.
595
855cd9b1
JJ
5962019-03-19 Jakub Jelinek <jakub@redhat.com>
597
598 PR c/89734
599 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
600 return type even if quals_used is 0. Formatting fixes.
601
baa09dc5
RB
6022019-03-14 Richard Biener <rguenther@suse.de>
603
604 * c-tree.h (enum c_declspec_il): New.
605 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
606 enum bitfield.
607 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
608 Pass start pass and declspec_il to c_parser_parse_gimple_body.
609 (c_parser_declspecs): Adjust.
610 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
611 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
612 and bitmap.h.
613 (struct gimple_parser): New.
614 (gimple_parser::push_edge): New method.
615 (c_parser_gimple_parse_bb_spec): New helper.
616 (c_parser_parse_gimple_body): Get start pass and IL specification.
617 Initialize SSA and CFG.
618 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
619 Build a gimple_parser parsing state and pass it along.
620 (c_parser_gimple_statement): Change intermittend __PHI internal
621 function argument for the edge.
622 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
623 (c_parser_gimple_goto_stmt): Record edges to build.
624 (c_parser_gimple_if_stmt): Likewise.
625 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
626 (c_parser_gimple_or_rtl_pass_list): Likewise.
627
a3f9f006
ML
6282019-03-11 Martin Liska <mliska@suse.cz>
629
630 * c-decl.c (check_for_loop_decls): Wrap an option name
631 in a string format message and fix GNU coding style.
632 * c-parser.c (c_parser_declspecs): Likewise.
633
1db01ff9
JJ
6342019-03-08 Jakub Jelinek <jakub@redhat.com>
635
636 PR tree-optimization/89550
637 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
638 returned true.
639 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
640 or warning returned true.
641
66dcb747
JJ
6422019-02-28 Jakub Jelinek <jakub@redhat.com>
643
644 PR c/89525
645 * c-typeck.c (convert_arguments): Call inform_declaration only if
646 the previous warning_at call returned true.
647
2263c9f2
TS
6482019-02-22 Thomas Schwinge <thomas@codesourcery.com>
649
650 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
651 parameter. Adjust all users.
652 (c_parser_oacc_simple_clause): Replace parser with loc formal
653 parameter. Adjust all users.
654
ab20d992 6552019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
656
657 PR c/87924
658 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
659 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
660
5f88ba10
JJ
6612019-02-15 Jakub Jelinek <jakub@redhat.com>
662
663 PR c/89340
664 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
665 before c_decl_attributes rather than after it.
666
cfc30fd1
JJ
6672019-02-06 Jakub Jelinek <jakub@redhat.com>
668
669 PR c/89211
670 * c-parser.c (c_parser_declaration_or_fndef): Don't update
671 DECL_ARGUMENTS of d if it has been defined already. Use a single if
672 instead of 3 nested ifs.
673
fbe83e6b
JM
6742019-02-06 Joseph Myers <joseph@codesourcery.com>
675
676 PR c/88584
677 * c-decl.c (finish_decl): Do not complete array types for arrays
678 with external linkage not at file scope.
679
f461f938
RB
6802019-02-05 Richard Biener <rguenther@suse.de>
681
682 PR c/88606
683 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
684 all type variants when not supported.
685
fe509359
JJ
6862019-01-30 Jakub Jelinek <jakub@redhat.com>
687
688 PR c/89061
689 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
690 * c-decl.c (decl_jump_unsafe): Return false for
691 C_DECL_COMPOUND_LITERAL_P decls.
692 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
693
6a335b96
JJ
6942019-01-29 Jakub Jelinek <jakub@redhat.com>
695
f4b7e754
JJ
696 PR c/89045
697 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
698 scope.
699
6a335b96
JJ
700 PR c/86125
701 * c-decl.c (last_fileptr_type): Remove.
702 (last_structptr_types): New variable.
703 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
704 {old,new}rettype instead of the types themselves. Assert
705 last_structptr_types array has the same number of elements
706 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
707 argument oldtype and newtype. Instead of handling
708 just fileptr_type_node specially, handle all builtin_structptr_types
709 pointer nodes. Formatting fix.
710
d8b5a1a0
MS
7112019-01-24 Martin Sebor <msebor@redhat.com>
712
713 PR c/86125
714 PR c/88886
715 PR middle-end/86308
716 * c-decl.c (match_builtin_function_types): Add arguments.
717 (diagnose_mismatched_decls): Diagnose mismatched declarations
718 of built-ins more strictly.
719
e21c4491
JJ
7202019-01-24 Jakub Jelinek <jakub@redhat.com>
721
722 PR c++/88976
723 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
724 on #pragma omp cancel with different modifiers.
725
420183d9
L
7262019-01-18 H.J. Lu <hongjiu.lu@intel.com>
727
728 PR c/51628
729 PR c/88664
730 * c-typeck.c (convert_for_assignment): Upate the
731 warn_for_address_or_pointer_of_packed_member call.
732
17ad43dd
TH
7332019-01-16 Tom Honermann <tom@honermann.net>
734 Jason Merrill <jason@redhat.com>
735
736 * c-typeck.c (digest_init): Revised the error message produced for
737 ill-formed cases of array initialization with a string literal.
738 (error_init): Make variadic.
739
5f07d78a
JJ
7402019-01-12 Jakub Jelinek <jakub@redhat.com>
741
742 * c-typeck.c (convert_for_assignment): Fix a comment typo.
743
c4581bbf
JJ
7442019-01-07 Jakub Jelinek <jakub@redhat.com>
745
746 PR c/88701
747 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
748 if current_function_decl is non-NULL.
749
65c5b1eb
JM
7502019-01-07 Joseph Myers <joseph@codesourcery.com>
751
752 PR c/88720
753 PR c/88726
754 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
755 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
756 functions declared but never defined only for external scope, not
757 for other scopes.
758
d8fcab68
JJ
7592019-01-07 Jakub Jelinek <jakub@redhat.com>
760
761 PR c++/85052
762 * c-parser.c (c_parser_postfix_expression): Parse
763 __builtin_convertvector.
764
a5544970
JJ
7652019-01-01 Jakub Jelinek <jakub@redhat.com>
766
767 Update copyright years.
768
da77eace
L
7692018-12-20 H.J. Lu <hongjiu.lu@intel.com>
770
771 PR c/51628
772 * c-typeck.c (convert_for_assignment): Call
773 warn_for_address_or_pointer_of_packed_member.
774
1edf8866
SB
7752018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
776
777 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
778 a more specific error message (instead of just falling through).
779
db4fd626
SB
7802018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
781
782 * c-parser.c (c_parser_asm_statement): Keep track of the location each
783 asm qualifier is first seen; use that to give nicer "duplicate asm
784 qualifier" messages. Delete 'quals" variable, instead pass the
785 "is_volatile_ flag to build_asm_stmt directly.
786 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
787 * c-typeck.c (build_asm_stmt): Ditto; adjust.
788
9c9cfcbb
SB
7892018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
790
791 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
792 "done" boolean variable.
793
a14feb3c
DM
7942018-12-19 David Malcolm <dmalcolm@redhat.com>
795
796 PR c++/87504
797 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
798 Move from here to gcc-rich-location.h and gcc-rich-location.c.
799 (build_binary_op): Use struct op_location_t and
800 class binary_op_rich_location.
801
6d939173
JJ
8022018-12-11 Jakub Jelinek <jakub@redhat.com>
803
804 PR sanitizer/88426
805 * c-convert.c (convert): Call c_fully_fold before calling
806 ubsan_instrument_float_cast.
807
b7055028
SB
8082018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
809
810 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
811 setting "quals".
812
5b76e75f
SB
8132018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
814
815 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
816 after asm. Pass a flag for it to build_asm_expr.
817 * c-tree.h (build_asm_expr): Update declaration.
818 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
819 set ASM_INLINE_P.
820
30bd42b9
SB
8212018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
822
823 PR inline-asm/55681
824 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
825 combination of volatile and goto, in any order, without repetitions.
826
9df6c0e4
JB
8272018-12-04 James Norris <jnorris@codesourcery.com>
828 Cesar Philippidis <cesar@codesourcery.com>
829 Julian Brown <julian@codesourcery.com>
830
831 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
832 code.
833
f44697b7
RB
8342018-11-30 Richard Biener <rguenther@suse.de>
835
836 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
837 _Literal (type) { ... } as empty aggregate or vector constructor.
838
550dfbdc
MS
8392018-11-29 Martin Sebor <msebor@redhat.com>
840
841 PR c/88091
842 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
843 (convert_arguments): Add comments. Pass additional argument to
844 the function above.
845
673670da
MS
8462018-11-29 Martin Sebor <msebor@redhat.com>
847
848 PR c/88172
849 PR testsuite/88208
850 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
851
db1d09b0
MS
8522018-11-23 Martin Sebor <msebor@redhat.com>
853
854 PR testsuite/88098
855 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
856 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
857
98f08eb8
MS
8582018-11-20 Martin Sebor <msebor@redhat.com>
859
860 * c-parser.c (c_parser_has_attribute_expression): New function.
861 (c_parser_attribute): New function.
862 (c_parser_attributes): Move code into c_parser_attribute.
863 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
864
cd5da983
MS
8652018-11-15 Martin Sebor <msebor@redhat.com>
866
867 PR c/83656
868 * c-decl.c (header_for_builtin_fn): Declare.
869 (diagnose_mismatched_decls): Diagnose declarations of built-in
870 functions without a prototype.
871 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
872 (convert_argument): Same.
873 (convert_arguments): Factor code out into convert_argument.
874 Detect mismatches between built-in formal arguments in calls
875 to built-in without prototype.
876 (build_conditional_expr): Same.
877 (type_or_builtin_type): New function.
878 (convert_for_assignment): Add argument. Conditionally issue
879 warnings instead of errors for mismatches.
880
620e594b
DM
8812018-11-13 David Malcolm <dmalcolm@redhat.com>
882
883 * c-decl.c: Replace "source_location" with "location_t".
884 * c-tree.h: Likewise.
885 * c-typeck.c: Likewise.
886 * gimple-parser.c: Likewise.
887
3179ebae
JJ
8882018-11-09 Jakub Jelinek <jakub@redhat.com>
889
81a227c6
JJ
890 * c-parser.c (c_parser_omp_clause_final): Use
891 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
892 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
893 parsing instead of c_parser_paren_condition.
894 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
895 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
896 c_fully_fold instead of c_parser_condition.
897 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
898 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
899 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
900 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
901 c_parser_expr_no_commas instead of c_parser_expression.
902
98c91c56
JJ
903 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
904 reduction clause with inscan modifier.
905
3179ebae
JJ
906 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
907 clauses other than atomic_default_mem_order.
908
28567c40
JJ
9092018-11-08 Jakub Jelinek <jakub@redhat.com>
910
911 * c-parser.c: Include memmode.h.
912 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
913 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
914 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
915 task_reduction clauses.
916 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
917 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
918 section, or lvalue assignment expression.
919 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
920 (c_parser_omp_clause_lastprivate): Parse optional
921 conditional: modifier.
922 (c_parser_omp_clause_hint): Require constant integer expression rather
923 than just integer expression.
924 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
925 clause.
926 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
927 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
928 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
929 functions.
930 (c_parser_omp_clause_depend): Parse iterator modifier and handle
931 iterators. Parse mutexinoutset and depobj kinds.
932 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
933 callers.
934 (c_parser_omp_all_clauses): Likewise. Handle
935 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
936 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
937 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
938 default memory order from requires directive if any. Adjust
939 c_finish_omp_atomic caller.
940 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
941 (c_parser_omp_flush): Parse flush with memory-order-clause.
942 (c_parser_omp_for_loop): Allow NE_EXPR even in
943 OpenMP loops, adjust c_finish_omp_for caller.
944 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
945 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
946 Allow to be called while parsing combined parallel master.
947 Parse combined master taskloop{, simd}.
948 (c_parser_omp_parallel): Parse combined
949 parallel master{, taskloop{, simd}} constructs.
950 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
951 (OMP_TASKGROUP_CLAUSE_MASK): Define.
952 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
953 (OMP_TASKWAIT_CLAUSE_MASK): Define.
954 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
955 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
956 around teams body. Use SET_EXPR_LOCATION.
957 (c_parser_omp_target_data): Allow target data
958 with only use_device_ptr clauses.
959 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
960 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
961 (c_parser_omp_requires): New function.
962 (c_finish_taskloop_clauses): New function.
963 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
964 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
965 declaration. Disallow in_reduction clause when combined with parallel
966 master.
967 (c_parser_omp_construct): Adjust c_parser_omp_master and
968 c_parser_omp_taskgroup callers.
969 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
970 other than cancel.
971 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
972 like OMP_CLAUSE_REDUCTION.
973 (handle_omp_array_sections): Likewise. Call save_expr on array
974 reductions before calling build_index_type. Handle depend clauses
975 with iterators.
976 (struct c_find_omp_var_s): New type.
977 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
978 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
979 with static, runtime or auto schedule kinds. Call save_expr for whole
980 array reduction sizes. Diagnose reductions with zero sized elements
981 or variable length structures. Diagnose nogroup clause used with
982 reduction clause(s). Handle depend clause with
983 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
984 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
985 some different type for other kinds. Use build_unary_op with
986 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
987 Handle depend clauses with iterators. Remove no longer needed special
988 case that predetermined const qualified vars may be specified in
989 firstprivate clause. Complain if const qualified vars are mentioned
990 in data-sharing clauses other than firstprivate or shared. Use
991 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
992 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
993 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
994 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
995
7e2de6df
DM
9962018-10-29 David Malcolm <dmalcolm@redhat.com>
997
998 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
999 logic for change to name_hint::operator bool.
1000 (undeclared_variable): Likewise.
1001 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1002 (c_parser_parameter_declaration): Likewise.
1003
9f936c86
JM
10042018-10-17 Joseph Myers <joseph@codesourcery.com>
1005
1006 * c-errors.c (pedwarn_c11): New function.
1007 * c-parser.c (disable_extension_diagnostics): Save
1008 warn_c11_c2x_compat and set it to 0.
1009 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1010 (c_parser_static_assert_declaration_no_semi): Handle
1011 _Static_assert without string constant.
1012 * c-tree.h (pedwarn_c11): New prototype.
1013
033eb567
DM
10142018-10-17 David Malcolm <dmalcolm@redhat.com>
1015
1016 * Make-lang.in (selftest-c): New.
1017 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1018 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1019 from gcc/Makefile.in.
1020
0edf3afe
RB
10212018-10-02 Richard Biener <rguenther@suse.de>
1022
1023 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1024
8313a764
JM
10252018-09-26 Joseph Myers <joseph@codesourcery.com>
1026
1027 PR c/87390
1028 * c-typeck.c (build_binary_op): Use excess precision for
1029 comparisons of integers and floating-point for C11 and later.
1030
ce6f0888
MJ
10312018-09-26 Martin Jambor <mjambor@suse.cz>
1032
1033 PR c/87347
1034 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1035 comment.
ce6f0888 1036
9c4a4b3c
DM
10372018-09-17 David Malcolm <dmalcolm@redhat.com>
1038
1039 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1040 Update for new param.
1041 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1042 Likewise.
1043
80c6d1f4
MJ
10442018-09-17 Martin Jambor <mjambor@suse.cz>
1045
1046 PR c/63886
1047 * c-parser.c: (warn_for_abs): New function.
1048 (c_parser_postfix_expression_after_primary): Call it.
1049
4a426e36
BE
10502018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1051
1052 * c-typeck.c (digest_init): Shorten overlength strings.
1053
6d900107
BE
10542018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1055
1056 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1057
b5764229
BE
10582018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1059
1060 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1061 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1062
22eea6b2
AM
10632018-08-30 Alexander Monakov <amonakov@ispras.ru>
1064
1065 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1066 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1067
85204e23
DM
10682018-08-27 David Malcolm <dmalcolm@redhat.com>
1069
1070 PR 87091
1071 * c-decl.c (implicitly_declare): Update call to
1072 maybe_add_include_fixit to suggest overriding the location, as it
1073 is for a note.
1074 * c-objc-common.c (c_tree_printer): Update for conversion of
1075 show_caret_p to a tri-state.
1076
3d78e008
ML
10772018-08-27 Martin Liska <mliska@suse.cz>
1078
1079 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1080 fndecl_built_in_p and remove check for FUNCTION_DECL if
1081 possible.
3d78e008
ML
1082 (diagnose_mismatched_decls): Likewise.
1083 (merge_decls): Likewise.
1084 (warn_if_shadowing): Likewise.
1085 (pushdecl): Likewise.
1086 (implicitly_declare): Likewise.
1087 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1088 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1089 * c-typeck.c (build_function_call_vec): Likewise.
1090 (convert_arguments): Likewise.
1091
097f82ec
DM
10922018-08-20 David Malcolm <dmalcolm@redhat.com>
1093
1094 PR other/84889
1095 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1096 (diagnose_mismatched_decls): Likewise, in various places.
1097 (warn_if_shadowing): Likewise.
1098 (implicit_decl_warning): Likewise.
1099 (implicitly_declare): Likewise.
1100 (undeclared_variable): Likewise.
1101 (declare_label): Likewise.
1102 (grokdeclarator): Likewise.
1103 (start_function): Likewise.
1104 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1105 (c_parser_parameter_declaration): Likewise.
1106 (c_parser_binary_expression): Likewise.
1107 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1108 (parser_build_binary_op): Likewise.
1109 (build_unary_op): Likewise.
1110 (error_init): Likewise.
1111 (pedwarn_init): Likewise.
1112 (warning_init): Likewise.
1113 (convert_for_assignment): Likewise.
1114
96e6ae57
DM
11152018-08-15 David Malcolm <dmalcolm@redhat.com>
1116
1117 * c-objc-common.c: Include "gcc-rich-location.h".
1118 (c_tree_printer): Move implemenation of '%T' to...
1119 (print_type): ...this new function.
1120 (range_label_for_type_mismatch::get_text): New function.
1121 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1122 range for the various ic_argpass cases.
1123 (class maybe_range_label_for_tree_type_mismatch): New class.
1124 (build_binary_op): Use it when calling binary_op_error.
1125
0cd020ae 11262018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1127
0cd020ae
PK
1128 * c-decl.c (start_decl): Do not warn if variables is named as main
1129 and is a local variable.
1130
72733314
IS
11312018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1132
1133 PR c/19315
1134 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1135 objects of unknown size.
1136
23aa9f7c
MS
11372018-08-13 Martin Sebor <msebor@redhat.com>
1138
1139 PR tree-optimization/71625
1140 * c-parser.c (c_parser_declaration_or_fndef): Call
1141 braced_list_to_string.
1142
e5e7e50d
BH
11432018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1144
1145 PR c/86690
1146 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1147 errors.
1148
8a45b051
MS
11492018-08-01 Martin Sebor <msebor@redhat.com>
1150
1151 PR tree-optimization/86650
1152 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1153 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1154
5922dcb5
JJ
11552018-08-01 Jakub Jelinek <jakub@redhat.com>
1156
1157 PR c/85704
1158 * c-typeck.c (init_field_decl_cmp): New function.
1159 (output_pending_init_elements): Use it for field comparisons
1160 instead of pure bit_position comparisons.
1161
9b452033
JJ
11622018-07-12 Jakub Jelinek <jakub@redhat.com>
1163
1164 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1165 type here, instead add "omp declare target implicit" attribute.
1166 (finish_decl): Diagnose vars without mappable type here.
1167
ab20d992
JJ
11682018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1169 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1170 Cesar Philippidis <cesar@codesourcery.com>
1171
1172 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1173 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1174 to their non-present_or_* counterparts. Make 'self' an alias to
1175 PRAGMA_OACC_CLAUSE_HOST.
1176 (c_parser_oacc_data_clause): Update GOMP mappings for
1177 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1178 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1179 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1180 Remove support for present_or_* clauses.
1181 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1182 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1183 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1184 (OACC_DATA_CLAUSE_MASK): Likewise.
1185 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1186 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1187 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1188 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1189 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1190
e197e64e
KV
11912018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1192
1193 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1194 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1195 (c_parser_gimple_unary_expression): Likewise.
1196
487f2f61
JJ
11972018-06-15 Jakub Jelinek <jakub@redhat.com>
1198
1199 PR c/86093
1200 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1201 before doing POINTER_DIFF_EXPR.
1202
e4d44a37
MP
12032018-06-07 Marek Polacek <polacek@redhat.com>
1204
1205 PR c/85318
1206 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1207 for loop initial declarations.
1208
b67b9225
DP
12092018-05-30 David Pagan <dave.pagan@oracle.com>
1210
1211 PR c/55976
1212 * c-decl.c (grokdeclarator): Update check for return type warnings.
1213 (start_function): Likewise.
1214 (finish_function): Likewise.
1215 * c-typeck.c (c_finish_return): Update check for return type warnings.
1216 Pass OPT_Wreturn_type to pedwarn when appropriate.
1217
c566cc9f
RS
12182018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1219
1220 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1221 __FMA_EXPR handlng.
1222
e4f81565
RS
12232018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1224
1225 * gimple-parser.c: Include internal-fn.h.
1226 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1227 (c_parser_gimple_call_internal): New function.
1228 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1229 Fix typos in comment.
1230
79e7b1fe
JJ
12312018-05-10 Jakub Jelinek <jakub@redhat.com>
1232
1233 PR c++/85662
1234 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1235 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1236 fold_convert_loc.
1237 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1238 fold_offsetof_1, pass argtype as TYPE to it and drop the
1239 fold_convert_loc.
1240
f7584c81
DP
12412018-05-02 David Pagan <dave.pagan@oracle.com>
1242
1243 PR c/30552
1244 * c-decl.c (old_style_parameter_scope): New function.
1245 * c-parser.c (c_parser_postfix_expression): Check for statement
1246 expressions in old-style function parameter list declarations.
1247 * c-parser.h (old_style_parameter_scope): New extern declaration.
1248
b33a0cb3
JJ
12492018-04-25 Jakub Jelinek <jakub@redhat.com>
1250
1251 PR sanitizer/84307
1252 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1253 it is not TREE_STATIC.
1254 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1255 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1256 its COMPOUND_LITERAL_EXPR_DECL.
1257
c5c5822a
JM
12582018-03-21 Joseph Myers <joseph@codesourcery.com>
1259
1260 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1261 where all functions return the same _FloatN or _FloatNx type,
1262 treat integer types as _Float64 instead of double.
1263
aa1c9429
JJ
12642018-03-21 Jakub Jelinek <jakub@redhat.com>
1265
1266 PR c/84999
1267 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1268 building vector comparison, diagnose it and return error_mark_node.
1269
9bb45a95
JJ
12702018-03-15 Jakub Jelinek <jakub@redhat.com>
1271
1272 PR c/84853
1273 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1274 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1275 INTEGER_TYPE element type.
1276
ada6bad9
DP
12772018-03-13 David Pagan <dave.pagan@oracle.com>
1278
1279 PR c/46921
1280 * c-typeck.c (output_init_element): Ensure field initializer
1281 expression is always evaluated if there are side effects.
1282
849bbdb9
JJ
12832018-03-06 Jakub Jelinek <jakub@redhat.com>
1284
1285 PR c/84721
1286 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1287 !building_stmt_list_p ().
1288
d74641bd
RS
12892018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1290
1291 PR c/84305
1292 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1293 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1294 and include the BIND_EXPR in the list of things that need to be
1295 pre-evaluated.
1296
0444aa9c
NS
12972018-02-09 Nathan Sidwell <nathan@acm.org>
1298
1299 PR c/84293
1300 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1301 to strict_aliasing_warning.
1302
7c30b12a
PC
13032018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1304
1305 * c-typeck.c (really_start_incremental_init, push_init_level,
1306 set_nonincremental_init, output_init_element, process_init_element):
1307 Use DECL_UNNAMED_BIT_FIELD.
1308
2be4dfcb
MP
13092018-01-31 Marek Polacek <polacek@redhat.com>
1310
1311 PR c/81779
1312 * c-parser.c (c_parser_compound_statement_nostart): Call
1313 expansion_point_location_if_in_system_header.
1314
bb9869d5
DM
13152018-01-17 David Malcolm <dmalcolm@redhat.com>
1316
1317 PR c++/83814
1318 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1319 the C part.
1320
b4923738
JJ
13212018-01-13 Jakub Jelinek <jakub@redhat.com>
1322
1323 PR c/83801
1324 * c-tree.h (decl_constant_value_1): Add a bool argument.
1325 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1326 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1327 (decl_constant_value): Adjust caller.
1328 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1329 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1330 decl_constant_value returns initializer that has BLKmode or
1331 array type.
1332 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1333
928686b1
RS
13342018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1335 Alan Hayward <alan.hayward@arm.com>
1336 David Sherwood <david.sherwood@arm.com>
1337
1338 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1339 TYPE_VECTOR_SUBPARTS.
1340
85ec4feb
JJ
13412018-01-03 Jakub Jelinek <jakub@redhat.com>
1342
1343 Update copyright years.
1344
913884f7
JJ
13452018-01-01 Jakub Jelinek <jakub@redhat.com>
1346
1347 PR c/83595
1348 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1349 c_parser_conditional_expression, c_parser_cast_expression,
1350 c_parser_sizeof_expression, c_parser_alignof_expression,
1351 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1352 c_parser_transaction_expression): Use set_error () method instead
1353 of setting value member to error_mark_node.
1354
c6cfa2bf
MM
13552017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1356
1357 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1358 and _Float<N>X built-in functions.
1359
11d29d63
JJ
13602017-12-22 Jakub Jelinek <jakub@redhat.com>
1361
14ec014e
JJ
1362 PR debug/83550
1363 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1364 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1365 incomplete vars rather than after it.
1366
11d29d63
JJ
1367 PR debug/83547
1368 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1369 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1370 and consider empty ones if there are no other stmts. For
1371 -Wunused-value walk all statements before the one only followed by
1372 DEBUG_BEGIN_STMTs.
1373
170a8bd6 13742017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1375 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1376
1377 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1378 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1379 (c_parser_do_statement): Likewise.
1380 (c_parser_for_statement): Likewise.
1381 (c_parser_statement_after_labels): Adjust calls to above.
1382 (c_parse_pragma_ivdep): New static function.
1383 (c_parser_pragma_unroll): Likewise.
1384 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1385 <PRAGMA_UNROLL>: New case.
1386
01512446
JJ
13872017-12-19 Jakub Jelinek <jakub@redhat.com>
1388
1389 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1390 perform_integral_promotions, digest_init): Replace Yoda conditions
1391 with typical order conditions.
1392 * c-decl.c (check_bitfield_type_and_width): Likewise.
1393
c65e18d3
BE
13942017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1395
1396 * c-typeck.c (c_safe_arg_type_equiv_p,
1397 c_safe_function_type_cast_p): New function.
1398 (build_c_cast): Implement -Wcast-function-type.
1399
b7280579
RB
14002017-12-14 Richard Biener <rguenther@suse.de>
1401
1402 PR c/83415
1403 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1404 like REALPART_EXPR for the behavior of whether its operand
1405 is an lvalue.
1406
49e6a6c0
MP
14072017-12-12 Marek Polacek <polacek@redhat.com>
1408
1409 PR c/82679
1410 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1411
ab20d992 14122017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1413
1414 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1415 * c-parser.c (add_debug_begin_stmt): New.
1416 (c_parser_declaration_or_fndef): Call it.
1417 (c_parser_compound_statement_nostart): Likewise.
1418 (c_parser_statement_after_labels): Likewise.
1419 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1420
4b2b493f
JM
14212017-12-07 Joseph Myers <joseph@codesourcery.com>
1422
1423 * c-decl.c (build_compound_literal): Add parameter alignas_align
1424 and set alignment of decl if nonzero.
1425 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1426 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1427 qualifier.
1428 (c_parser_struct_declaration): Update syntax comment.
1429 (c_parser_type_name): Add alignas_ok argument and pass it to
1430 c_parser_declspecs.
1431 (c_parser_cast_expression): Pass true to c_parser_type_name and
1432 give error if a cast used an _Alignas specifier.
1433 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1434 give error if sizeof (type-name) used an _Alignas specifier.
1435 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1436 give error if _Alignof (type-name) used an _Alignas specifier.
1437 (c_parser_postfix_expression_after_paren_type): Check specified
1438 alignment for a compound literal and pass it to
1439 build_compound_literal.
1440 * c-parser.h (c_parser_type_name): Update prototype.
1441 * c-tree.h (build_compound_literal): Update prototype.
1442
5d9ae53d
MS
14432017-12-07 Martin Sebor <msebor@redhat.com>
1444
1445 PR c/81544
1446 * c-decl.c (c_decl_attributes): Look up existing declaration and
1447 pass it to decl_attributes.
1448
c79144f8
DM
14492017-12-06 David Malcolm <dmalcolm@redhat.com>
1450
1451 PR c/83236
1452 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1453 reserved for use by the implementation.
1454
613bc14f
DM
14552017-12-06 David Malcolm <dmalcolm@redhat.com>
1456
1457 * c-decl.c: Include "c-family/c-spellcheck.h".
1458
05abad4c
ML
14592017-12-05 Martin Liska <mliska@suse.cz>
1460 Jakub Jelinek <jakub@redhat.com>
1461
1462 * c-typeck.c (pointer_diff): Add new argument and instrument
1463 pointer subtraction.
1464 (build_binary_op): Similar for pointer comparison.
1465
cc6534d4
JJ
14662017-12-01 Jakub Jelinek <jakub@redhat.com>
1467
65791f42
JJ
1468 PR c/79153
1469 * c-parser.c: Include tree-iterator.h.
1470 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1471 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1472 on it.
1473
cc6534d4
JJ
1474 PR c/83222
1475 * c-tree.h (decl_constant_value_1): Declare.
1476 * c-typeck.c (decl_constant_value_1): New function.
1477 (decl_constant_value): Use it.
1478 * c-fold.c (c_fully_fold_internal): If in_init, use
1479 decl_constant_value_1 instead of decl_constant_value.
1480
5de73c05
JJ
14812017-11-30 Jakub Jelinek <jakub@redhat.com>
1482
1483 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1484
058f0b9e
JJ
14852017-11-28 Jakub Jelinek <jakub@redhat.com>
1486
1487 PR sanitizer/81275
1488 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1489 c_switch_covers_all_cases_p returns true.
1490
5e9d6aa4 14912017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1492 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1493
1494 * Make-lang.in (c/c-array-notation.o): Remove.
1495 * c-array-notation.c: Delete.
1496 * c-decl.c: Remove cilkplus condition.
1497 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1498 c_parser_cilk_verify_simd, c_parser_array_notation,
1499 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1500 c_parser_cilk_simd_fn_vector_attrs,
1501 c_finish_cilk_simd_fn_tokens): Delete.
1502 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1503 (c_parser_direct_declarator_inner): Ditto.
1504 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1505 (c_parser_attributes, c_parser_compound_statement,
1506 c_parser_statement_after_labels, c_parser_if_statement,
1507 c_parser_switch_statement, c_parser_while_statement,
1508 c_parser_do_statement, c_parser_for_statement,
1509 c_parser_unary_expression, c_parser_postfix_expression,
1510 c_parser_postfix_expression_after_primary,
1511 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1512 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1513 support.
1514 * c-typeck.c (build_array_ref, build_function_call_vec,
1515 convert_arguments,
1516 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1517 c_finish_loop, build_binary_op): Remove cilkplus support.
1518
9e851845
JJ
15192017-11-28 Jakub Jelinek <jakub@redhat.com>
1520
1521 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1522 of build3.
1523
ab20d992 15242017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1525
1526 * Make-lang.in (c.install-plugin): Install backend import library.
1527
41521dee
JJ
15282017-11-23 Jakub Jelinek <jakub@redhat.com>
1529
1530 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1531 pragma_stmt context.
1532
ac9effed
EB
15332017-11-23 Mike Stump <mikestump@comcast.net>
1534 Eric Botcazou <ebotcazou@adacore.com>
1535
1536 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1537 ANNOTATE_EXPR.
1538 (c_parser_do_statement): Likewise.
1539 (c_parser_for_statement): Likewise.
1540
ce95abc4
DM
15412017-11-22 David Malcolm <dmalcolm@redhat.com>
1542
1543 PR c++/62170
1544 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1545 bool to bool *. Within '%T' handling, if showing an "aka", use
1546 "quoted" param to add appropriate quoting.
1547
974aedcc
MP
15482017-11-22 Marek Polacek <polacek@redhat.com>
1549
1550 PR c++/60336
1551 PR middle-end/67239
1552 PR target/68355
1553 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1554
d4300cc6
DM
15552017-11-21 David Malcolm <dmalcolm@redhat.com>
1556
1557 PR c/83056
1558 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1559 earlier failed lookups.
1560
1af4ebf5
MG
15612017-11-21 Marc Glisse <marc.glisse@inria.fr>
1562
1563 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1564 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1565
26edace6
DM
15662017-11-20 David Malcolm <dmalcolm@redhat.com>
1567
1568 PR c/81404
1569 * c-decl.c: Include "c-family/known-headers.h".
1570 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1571 to known-headers.cc.
1572 (class suggest_missing_header): Move to known-header.h.
1573 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1574 than get_c_name_hint.
1575
b1212255
DM
15762017-11-20 David Malcolm <dmalcolm@redhat.com>
1577
1578 * c-decl.c (get_c_name_hint): New function.
1579 (class suggest_missing_header): New class.
1580 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1581 suggest missing headers to the user.
1582
6c7a259b
DM
15832017-11-20 David Malcolm <dmalcolm@redhat.com>
1584
1585 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1586 Include "c-family/name-hint.h"
1587 (implicit_decl_warning): Convert "hint" from
1588 const char * to name_hint. Pass location to
1589 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1590 warning was not printed.
1591 (undeclared_variable): Likewise for "guessed_id".
1592 (lookup_name_fuzzy): Convert return type from const char *
1593 to name_hint. Add location_t param.
1594 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1595 Include "c-family/name-hint.h"
1596 (c_parser_declaration_or_fndef): Convert "hint" from
1597 const char * to name_hint. Pass location to lookup_name_fuzzy.
1598 (c_parser_parameter_declaration): Likewise.
1599
f9c59f7e
JJ
16002017-11-19 Jakub Jelinek <jakub@redhat.com>
1601
1602 PR c/66618
1603 PR c/69960
1604 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1605 where needed.
1606 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1607 handle_omp_array_sections): Likewise.
1608 (digest_init): Don't call decl_constant_value_for_optimization.
1609 * c-tree.h (decl_constant_value_for_optimization): Removed.
1610 * c-fold.c (c_fold_array_ref): New function.
1611 (c_fully_fold_internal): Add LVAL argument, propagate it through
1612 recursive calls. For VAR_P call decl_constant_value and
1613 unshare if not LVAL and either optimizing or IN_INIT. Remove
1614 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1615 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1616 (c_fully_fold): Add LVAL argument, pass it through to
1617 c_fully_fold_internal.
1618 (decl_constant_value_for_optimization): Removed.
1619
3ca0dc60
JM
16202017-11-15 Joseph Myers <joseph@codesourcery.com>
1621
1622 PR c/81156
1623 * c-parser.c (check_tgmath_function): New function.
1624 (enum tgmath_parm_kind): New enum.
1625 (c_parser_postfix_expression): Handle __builtin_tgmath.
1626
64a5912c
DM
16272017-10-31 David Malcolm <dmalcolm@redhat.com>
1628
1629 * c-decl.c (implicit_decl_warning): Update for renaming of
1630 pedwarn_at_rich_loc and warning_at_rich_loc.
1631 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1632 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1633 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1634 (c_parser_struct_or_union_specifier): Likewise for renaming of
1635 pedwarn_at_rich_loc.
1636 (c_parser_parameter_declaration): Likewise for renaming of
1637 error_at_rich_loc.
1638 * c-typeck.c (build_component_ref): Likewise.
1639 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1640 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1641 (set_init_label): Likewise for renaming of error_at_rich_loc.
1642
c1136864
RB
16432017-10-30 Richard Biener <rguenther@suse.de>
1644
1645 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1646 stmts.
1647
ee5fd23a
MM
16482017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1649
1650 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1651 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1652
1a59ccf2
DM
16532017-10-25 David Malcolm <dmalcolm@redhat.com>
1654
1655 PR c/7356
1656 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1657 semicolons.
1658
bc1a75dd
JJ
16592017-10-25 Jakub Jelinek <jakub@redhat.com>
1660
1661 PR libstdc++/81706
1662 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1663 newdecl to corresponding __builtin_ if any.
1664
ff1ff960
PC
16652017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1666
1667 PR c++/82466
1668 * c-decl.c (diagnose_mismatched_decls): Use
1669 OPT_Wbuiltin_declaration_mismatch.
1670
62e1c678
DM
16712017-10-12 David Malcolm <dmalcolm@redhat.com>
1672
1673 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1674 use it to guard calls to maybe_suggest_missing_token_insertion.
1675 (c_parser_parms_list_declarator): Override default value of new
1676 "type_is_unique" param to c_parser_require.
1677 (c_parser_asm_statement): Likewise.
1678 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1679 defaulting to true.
1680
a92f6726
NS
16812017-10-11 Nathan Sidwell <nathan@acm.org>
1682
1683 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1684
8e6cdc90
RS
16852017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1686
1687 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1688 operating on trees as wide_ints.
1689 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1690 (c_tree_equal): Likewise.
1691
8139a48e
DM
16922017-10-04 David Malcolm <dmalcolm@redhat.com>
1693
1694 * c-decl.c (push_parm_decl): Store c_parm's location into the
1695 PARAM_DECL.
1696 (build_c_parm): Add "loc" param and store it within the c_parm.
1697 * c-parser.c (struct c_parser): Add "last_token_location" field.
1698 (c_parser_consume_token): Store location of the token into the
1699 new field.
1700 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1701 when handling a FUNCTION_DECL, if it doesn't already have them.
1702 (c_parser_parameter_declaration): Generate a location for the
1703 parameter, and pass it to the call to build_c_parm.
1704 * c-tree.h (struct c_parm): Add field "loc".
1705 (build_c_parm): Add location_t param.
1706 * c-typeck.c (get_fndecl_argument_location): New function.
1707 (inform_for_arg): New function.
1708 (convert_for_assignment): Use inform_for_arg when dealing with
1709 ic_argpass.
1710
2a389958
JJ
17112017-09-29 Jakub Jelinek <jakub@redhat.com>
1712
7d386d45
JJ
1713 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1714 width is non-NULL.
1715 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1716 don't SET_DECL_C_BIT_FIELD here.
1717
2a389958
JJ
1718 PR c/82340
1719 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1720 instead of trying to set just TREE_READONLY manually.
1721
ebc6a85e
TV
17222017-09-16 Tom de Vries <tom@codesourcery.com>
1723
1724 PR c/81875
1725 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1726 cond itself.
1727
bb75facd
JM
17282017-09-15 Joseph Myers <joseph@codesourcery.com>
1729
1730 PR c/82071
1731 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1732 for C11.
1733 (build_conditional_expr): For C11, generate result with excess
1734 precision when one argument is an integer and the other is of a
1735 type using excess precision.
1736
1d933576
BE
17372017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1738
1739 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1740
267bbb6f
MP
17412017-09-13 Marek Polacek <polacek@redhat.com>
1742
1743 PR c/82167
1744 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1745 than expr.original_type.
1746
6836632e
NS
17472017-09-12 Nathan Sidwell <nathan@acm.org>
1748
1749 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1750 resort_sorted_fields): Moved from c-family/c-common.c.
1751 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1752
e035be33
JM
17532017-09-01 Joseph Myers <joseph@codesourcery.com>
1754
1755 PR c/82071
1756 * c-typeck.c (build_atomic_assign): Handle argument with excess
1757 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1758 argument passed to build_binary_op and convert_for_assignment but
1759 not for call to c_fully_fold.
1760 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1761 Ensure build_binary_op is called with argument with original
1762 semantic type. Avoid calling c_fully_fold with an
1763 EXCESS_PRECISION_EXPR from build_binary_op.
1764
d2e05fcb
JJ
17652017-09-01 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR c/81887
1768 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1769
b397965c
RS
17702017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1771 Alan Hayward <alan.hayward@arm.com>
1772 David Sherwood <david.sherwood@arm.com>
1773
1774 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1775 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1776 m1 and m2 to the signed equivalent of a fixed-point
1777 SCALAR_TYPE_MODE.
1778
14e18d71
DM
17792017-08-24 David Malcolm <dmalcolm@redhat.com>
1780
1781 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1782 than CAN_HAVE_LOCATION_P when determining whether to use the
1783 location_t value within "value".
1784
7f204c0f
DM
17852017-08-21 David Malcolm <dmalcolm@redhat.com>
1786
1787 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1788 rather than peeking the location of the first token.
1789 * c-tree.h (c_expr::get_location): New method.
1790
2f687306
DM
17912017-08-21 David Malcolm <dmalcolm@redhat.com>
1792
1793 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1794 to check_function_arguments.
1795
3e7b80d7
MP
17962017-08-18 Marek Polacek <polacek@redhat.com>
1797
1798 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1799 commentary.
1800
00aa1fa2
L
18012017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1802
1803 PR c/53037
1804 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1805 (check_bitfield_type_and_width): Don't allow bit-field with
1806 warn_if_not_aligned type.
1807
da67acb9
MS
18082017-08-14 Martin Sebor <msebor@redhat.com>
1809
1810 PR c/81117
1811 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1812
bb85aa74
MP
18132017-08-11 Marek Polacek <polacek@redhat.com>
1814
1815 PR c/81795
1816 * c-decl.c (pushtag): Only print inform if the warning was printed.
1817 (grokdeclarator): Likewise.
1818
32129a17
DM
18192017-08-10 David Malcolm <dmalcolm@redhat.com>
1820
1821 * c-parser.c (c_parser_error): Rename to...
1822 (c_parser_error_richloc): ...this, making static, and adding
1823 "richloc" parameter, passing it to the c_parse_error call,
1824 rather than calling c_parser_set_source_position_from_token.
1825 (c_parser_error): Reintroduce, reimplementing in terms of the
1826 above, converting return type from void to bool.
1827 (class token_pair): New class.
1828 (struct matching_paren_traits): New struct.
1829 (matching_parens): New typedef.
1830 (struct matching_brace_traits): New struct.
1831 (matching_braces): New typedef.
1832 (get_matching_symbol): New function.
1833 (c_parser_require): Add param MATCHING_LOCATION, using it to
1834 highlight matching "opening" tokens for missing "closing" tokens.
1835 (c_parser_skip_until_found): Likewise.
1836 (c_parser_static_assert_declaration_no_semi): Convert explicit
1837 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1838 class matching_parens, so that the pertinent open parenthesis is
1839 highlighted when there are problems locating the close
1840 parenthesis.
1841 (c_parser_struct_or_union_specifier): Likewise.
1842 (c_parser_typeof_specifier): Likewise.
1843 (c_parser_alignas_specifier): Likewise.
1844 (c_parser_simple_asm_expr): Likewise.
1845 (c_parser_braced_init): Likewise, for matching_braces.
1846 (c_parser_paren_condition): Likewise, for matching_parens.
1847 (c_parser_switch_statement): Likewise.
1848 (c_parser_for_statement): Likewise.
1849 (c_parser_asm_statement): Likewise.
1850 (c_parser_asm_operands): Likewise.
1851 (c_parser_cast_expression): Likewise.
1852 (c_parser_sizeof_expression): Likewise.
1853 (c_parser_alignof_expression): Likewise.
1854 (c_parser_generic_selection): Likewise.
1855 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1856 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1857 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1858 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1859 c_parser_skip_until_found call.
1860 (c_parser_objc_class_definition): Use class matching_parens as
1861 above.
1862 (c_parser_objc_method_decl): Likewise.
1863 (c_parser_objc_try_catch_finally_statement): Likewise.
1864 (c_parser_objc_synchronized_statement): Likewise.
1865 (c_parser_objc_at_property_declaration): Likewise.
1866 (c_parser_oacc_wait_list): Likewise.
1867 (c_parser_omp_var_list_parens): Likewise.
1868 (c_parser_omp_clause_collapse): Likewise.
1869 (c_parser_omp_clause_default): Likewise.
1870 (c_parser_omp_clause_if): Likewise.
1871 (c_parser_omp_clause_num_threads): Likewise.
1872 (c_parser_omp_clause_num_tasks): Likewise.
1873 (c_parser_omp_clause_grainsize): Likewise.
1874 (c_parser_omp_clause_priority): Likewise.
1875 (c_parser_omp_clause_hint): Likewise.
1876 (c_parser_omp_clause_defaultmap): Likewise.
1877 (c_parser_oacc_single_int_clause): Likewise.
1878 (c_parser_omp_clause_ordered): Likewise.
1879 (c_parser_omp_clause_reduction): Likewise.
1880 (c_parser_omp_clause_schedule): Likewise.
1881 (c_parser_omp_clause_num_teams): Likewise.
1882 (c_parser_omp_clause_thread_limit): Likewise.
1883 (c_parser_omp_clause_aligned): Likewise.
1884 (c_parser_omp_clause_linear): Likewise.
1885 (c_parser_omp_clause_safelen): Likewise.
1886 (c_parser_omp_clause_simdlen): Likewise.
1887 (c_parser_omp_clause_depend): Likewise.
1888 (c_parser_omp_clause_map): Likewise.
1889 (c_parser_omp_clause_device): Likewise.
1890 (c_parser_omp_clause_dist_schedule): Likewise.
1891 (c_parser_omp_clause_proc_bind): Likewise.
1892 (c_parser_omp_clause_uniform): Likewise.
1893 (c_parser_omp_for_loop): Likewise.
1894 (c_parser_cilk_clause_vectorlength): Likewise.
1895 (c_parser_cilk_clause_linear): Likewise.
1896 (c_parser_transaction_expression): Likewise.
1897 * c-parser.h (c_parser_require): Add param matching_location with
1898 default UNKNOWN_LOCATION.
1899 (c_parser_error): Convert return type from void to bool.
1900 (c_parser_skip_until_found): Add param matching_location with
1901 default UNKNOWN_LOCATION.
1902
30af3a2b
MP
19032017-08-09 Marek Polacek <polacek@redhat.com>
1904
1905 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1906 * c-tree.h (build_external_ref): Update declaration.
1907 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1908 (build_external_ref): Change the type of a parameter to bool.
1909 (parser_build_binary_op): Use true/false instead of 1/0.
1910 (pointer_diff): Likewise.
1911 (build_modify_expr): Likewise.
1912 (set_designator): Change the type of a parameter to bool.
1913 (set_init_index): Use true/false instead of 1/0.
1914 (set_init_label): Likewise.
1915 (output_init_element): Change the type of a parameter to bool.
1916 (output_pending_init_elements): Use true/false instead of 1/0.
1917 (process_init_element): Likewise.
1918 (build_binary_op): Change the type of a parameter to bool.
1919
296c53ac
MP
19202017-08-09 Marek Polacek <polacek@redhat.com>
1921
1922 PR c/81233
1923 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1924 Call emit_diagnostic_valist instead of pedwarn.
1925 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1926 Print the relevant types in diagnostics.
1927
a32c8316
MP
19282017-08-09 Marek Polacek <polacek@redhat.com>
1929
1930 PR c/81417
1931 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 1932 build_conditional_expr.
a32c8316
MP
1933 * c-parser.c (c_parser_conditional_expression): Create locations for
1934 EXP1 and EXP2 from their source ranges. Pass the locations down to
1935 build_conditional_expr.
1936 * c-tree.h (build_conditional_expr): Update declaration.
1937 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1938 For -Wsign-compare, also print the types.
1939
314e6352
ML
19402017-08-08 Martin Liska <mliska@suse.cz>
1941
1942 * c-convert.c: Include header files.
1943 * c-typeck.c: Likewise.
1944
577eec56
ML
19452017-08-07 Martin Liska <mliska@suse.cz>
1946
1947 * c-parser.c (c_parser_attributes): Canonicalize name of an
1948 attribute.
1949
f7b6353a
MP
19502017-08-02 Marek Polacek <polacek@redhat.com>
1951
1952 PR c/81289
1953 * c-parser.c (c_parser_unary_expression): Use set_error.
1954
8a6eab34
MP
1955 PR c/81448
1956 PR c/81306
1957 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1958 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1959
ab20d992 19602017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
1961 Martin Liska <mliska@suse.cz>
1962
1963 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1964 statement.
7fef86d3 1965
f34ebeb2
ML
19662017-07-31 Martin Liska <mliska@suse.cz>
1967
1968 PR sanitize/81530
1969 * c-convert.c (convert): Guard condition with flag_sanitize_p
1970 also with current_function_decl non-null equality.
1971 * c-decl.c (grokdeclarator): Likewise.
1972 * c-typeck.c (build_binary_op): Likewise.
1973
8595f67b
MP
19742017-07-25 Marek Polacek <polacek@redhat.com>
1975
1976 * c-decl.c (grokfield): Remove local variable.
1977
d49718d6
MP
19782017-07-25 Marek Polacek <polacek@redhat.com>
1979
1980 PR c/81364
1981 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1982 macro expansion if the body is in { }.
1983 (c_parser_while_statement): Likewise.
1984 (c_parser_for_statement): Likewise.
1985
ff22eb12
NS
19862017-07-18 Nathan Sidwell <nathan@acm.org>
1987
1988 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1989
eea77d1f
DM
19902017-07-14 David Malcolm <dmalcolm@redhat.com>
1991
1992 * c-decl.c (implicitly_declare): When suggesting a missing
1993 #include, provide a fix-it hint.
1994
b6f43128
DM
19952017-07-06 David Malcolm <dmalcolm@redhat.com>
1996
1997 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1998 and call that instead.
1999 * c-tree.h (selftest::run_c_tests): New decl.
2000
3e2becc4
MP
20012017-06-26 Marek Polacek <polacek@redhat.com>
2002
2003 PR c/80116
2004 * c-parser.c (c_parser_if_body): Set the location of the
2005 body of the conditional after parsing all the labels. Call
2006 warn_for_multistatement_macros.
2007 (c_parser_else_body): Likewise.
2008 (c_parser_switch_statement): Likewise.
2009 (c_parser_while_statement): Likewise.
2010 (c_parser_for_statement): Likewise.
2011 (c_parser_statement): Add a default argument. Save the location
2012 after labels have been parsed.
2013 (c_parser_c99_block_statement): Likewise.
2014
343ae898
RB
20152017-06-19 Richard Biener <rguenther@suse.de>
2016
2017 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2018 negated _Literals to parse _Literal (int) -1.
2019
45b2222a
ML
20202017-06-13 Martin Liska <mliska@suse.cz>
2021
2022 PR sanitize/78204
2023 * c-convert.c (convert): Use sanitize_flags_p.
2024 * c-decl.c (grokdeclarator): Likewise.
2025 * c-typeck.c (convert_for_assignment): Likewise.
2026 (c_finish_return): Likewise.
2027 (build_binary_op): Likewise.
2028
8ab7005b
JJ
20292017-06-08 Jakub Jelinek <jakub@redhat.com>
2030
2031 PR c/81006
2032 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2033 to sizetype before size_binop.
2034
363dc72c
JJ
20352017-06-07 Jakub Jelinek <jakub@redhat.com>
2036
2037 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2038 of TDI_generic.
2039
dc949728
MP
20402017-06-06 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/79983
2043 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2044 ref.
2045 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2046
40ffd95f
BE
20472017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2048
2049 * c-parser.c (c_parser_binary_expression): Implement the
2050 -Wsizeof_pointer_div warning.
2051 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2052 from a parenthesized expression.
2053 (c_parser_expr_list): Use c_last_sizeof_loc.
2054 * c-tree.h (c_last_sizeof_loc): New external.
2055 * c-typeck.c (c_last_sizeof_loc): New variable.
2056 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2057
9fc5e7a4
MM
20582017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2059
2060 PR testsuite/80580
2061 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2062
f012c8ef
DM
20632017-05-30 David Malcolm <dmalcolm@redhat.com>
2064
2065 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2066 parameters.
2067
3cd211af
MS
20682017-05-24 Martin Sebor <msebor@redhat.com>
2069
2070 PR c/80731
2071 * c-fold.c (c_fully_fold_internal): Adjust.
2072 * c-typeck.c (parser_build_unary_op): Adjust.
2073
fd71a9a2
TS
20742017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2075
2076 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2077 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2078 "VECTOR_LENGTH".
2079
92fa0f9e
MP
20802017-05-23 Marek Polacek <polacek@redhat.com>
2081
2082 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2083 quotes.
2084
d11c168a
JJ
20852017-05-22 Jakub Jelinek <jakub@redhat.com>
2086
2087 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2088 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2089 it returned invariant. Call tree_invariant_p unconditionally
2090 afterwards to decide whether to return expr or op0.
2091
58aca9d9
NS
20922017-05-22 Nathan Sidwell <nathan@acm.org>
2093
2094 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2095
7fd549d2
TS
20962017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2097
2098 * c-parser.c (c_parser_omp_clause_default): Handle
2099 "OMP_CLAUSE_DEFAULT_PRESENT".
2100
6ecd2339
BE
21012017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2102
2103 * config-lang.in (gtfiles): Add c-family/c-format.c.
2104
8a57ecff
NS
21052017-05-18 Nathan Sidwell <nathan@acm.org>
2106
2107 * c-decl.c (pushdecl_top_level): Delete unused function.
2108
6574d78e
MP
21092017-05-18 Marek Polacek <polacek@redhat.com>
2110
2111 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2112 (check_earlier_gotos): Likewise.
2113 (define_label): Likewise.
2114 (pending_xref_error): Likewise.
2115 (smallest_type_quals_location): Likewise.
2116 (grokdeclarator): Likewise.
2117 (grokparms): Likewise.
2118 (identifier_global_value): Likewise.
2119 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2120 (find_init_member): Likewise.
2121
e3455240
MP
21222017-05-18 Marek Polacek <polacek@redhat.com>
2123
2124 * c-decl.c (start_decl): Use false/true instead of 0/1.
2125 (grokdeclarator): Likewise.
2126 (finish_struct): Likewise.
2127 (start_function): Change the return type to bool. Use false/true
2128 instead of 0/1.
2129 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2130 * c-tree.h (start_function): Update.
2131 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2132 (set_designator): Change the return type to bool. Use false/true
2133 instead of 0/1.
2134
3fa8871b
MP
21352017-05-17 Marek Polacek <polacek@redhat.com>
2136
2137 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2138 * c-typeck.c: Likewise.
2139
142473df
MP
21402017-05-17 Marek Polacek <polacek@redhat.com>
2141
2142 PR sanitizer/80659
2143 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2144 DECL_IGNORED_P even for non-static compound literals.
2145
1a817418
ML
21462017-05-17 Martin Liska <mliska@suse.cz>
2147
2148 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2149 use it instead of int type.
2150
b2fa0a8b
MP
21512017-05-17 Marek Polacek <polacek@redhat.com>
2152
2153 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2154 call c_fully_fold.
2155 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2156 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2157 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2158 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2159 save_expr.
2160 (c_parser_conditional_expression): Likewise.
2161 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2162 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2163 (process_init_element): Likewise.
2164 (build_binary_op): Likewise.
2165 (handle_omp_array_sections_1): Likewise.
2166
1e47f02b
TS
21672017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2168
2169 * c-parser.c (c_parser_omp_clause_num_gangs)
2170 (c_parser_omp_clause_num_workers)
2171 (c_parser_omp_clause_vector_length): Merge functions into...
2172 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2173 all users.
2174
c24e924f
NS
21752017-05-11 Nathan Sidwell <nathan@acm.org>
2176
2177 * gimple-parser.c: Don't #include tree-dump.h.
2178
c587104e
MM
21792017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2180
2181 PR testsuite/80580
2182 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2183
67ac9a9d
MM
21842017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2185
2186 PR testsuite/80580
2187 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2188 incorrect __MEM syntax.
2189
ac4eb40f
MM
21902017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2191
2192 PR testsuite/80580
2193 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2194 type of unary '*'.
2195
641da50a
NS
21962017-05-09 Nathan Sidwell <nathan@acm.org>
2197
2198 * c-tree.h (pushdecl): Declare.
2199
56d35585
DM
22002017-05-05 David Malcolm <dmalcolm@redhat.com>
2201
2202 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2203 with diagnostic_report_diagnostic.
2204 * c-errors.c (pedwarn_c99): Likewise.
2205 (pedwarn_c90): Likewise.
2206
815d9cc6
XR
22072017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2208
92a285c1 2209 PR c++/80038
815d9cc6
XR
2210 * c-gimplify.c (c_gimplify_expr): Remove calls to
2211 cilk_gimplifY_call_params_in_spawned_fn.
2212
1c4ea66f
DM
22132017-04-25 David Malcolm <dmalcolm@redhat.com>
2214
2215 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2216 hint for removing extra semicolon.
2217
666f7903
JJ
22182017-04-21 Jakub Jelinek <jakub@redhat.com>
2219
2220 PR c/80468
2221 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2222 enabled, set specs->type to integer_type_node.
2223
5764ee3c
JW
22242017-04-03 Jonathan Wakely <jwakely@redhat.com>
2225
2226 * c-array-notation.c: Fix typo in comment.
2227
10fa8dfb
MP
22282017-03-29 Marek Polacek <polacek@redhat.com>
2229
2230 PR c/79730
2231 * c-decl.c (finish_decl): Check VAR_P.
2232
a9e4a1a5
JJ
22332017-03-27 Jakub Jelinek <jakub@redhat.com>
2234
2235 PR middle-end/80162
2236 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2237 * c-typeck.c (c_mark_addressable): Likewise. Look through
2238 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2239 to ARRAY_TYPE.
2240 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2241
ee3ff394
MP
22422017-03-23 Marek Polacek <polacek@redhat.com>
2243
2244 * c-tree.h: Remove a C_RID_YYCODE reference.
2245
4d1b8e70
JJ
22462017-03-21 Jakub Jelinek <jakub@redhat.com>
2247
2248 PR c/80097
2249 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2250 optional COMPOUND_EXPR with ubsan instrumentation.
2251
31dc71a8
MP
22522017-03-17 Marek Polacek <polacek@redhat.com>
2253
2254 * c-parser.c: Add C11 references.
2255
d579c385
MP
22562017-03-15 Marek Polacek <polacek@redhat.com>
2257
2258 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2259
85059a38
MP
22602017-03-11 Marek Polacek <polacek@redhat.com>
2261
2262 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2263
2f6f187a
DM
22642017-03-10 David Malcolm <dmalcolm@redhat.com>
2265
2266 PR translation/79848
2267 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2268 "%qs".
2269 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2270
36618428
MP
22712017-03-09 Marek Polacek <polacek@redhat.com>
2272
2273 PR sanitizer/79757
2274 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2275 parameter declarations with initializers.
2276
01e5af5a
JJ
22772017-03-09 Jakub Jelinek <jakub@redhat.com>
2278
2279 PR c/79969
2280 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2281 TYPE_STUB_DECL.
2282
a71dbc63
JJ
22832017-03-07 Jakub Jelinek <jakub@redhat.com>
2284
2285 PR c/79834
2286 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2287 for "may only be used in compound statements" diagnostics, change it
2288 such that the same translatable string is used for all pragmas. For
2289 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2290 diagnostics.
2291 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2292 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2293 "may only be used in compound statements" diagnostics, such that the
2294 same translatable string is used for all pragmas.
2295
1ff4bae6
MP
22962017-03-04 Marek Polacek <polacek@redhat.com>
2297
2298 PR c/79847
2299 * c-decl.c (implicit_decl_warning): Add missing space.
2300
7f5a7d78
MP
23012017-03-03 Marek Polacek <polacek@redhat.com>
2302
2303 PR c/79758
2304 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2305 current_function_prototype_arg_types is error_mark_node. Fix
2306 formatting. Use TREE_VALUE instead of TREE_TYPE.
2307
883c8f06
JJ
23082017-03-03 Jakub Jelinek <jakub@redhat.com>
2309
79c9b7a8
JJ
2310 PR c/79837
2311 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2312 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2313 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2314 diagnostics.
2315
883c8f06
JJ
2316 PR c/79836
2317 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2318 instead of %<_Generic>.
2319 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2320 (c_parser_omp_target_exit_data): Use %<release%> instead of
2321 %<release>.
2322
324ff1a0
JJ
23232017-02-28 Jakub Jelinek <jakub@redhat.com>
2324
2325 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2326 instead of just cond ? "..." : "...".
2327 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2328 for "enter"/"exit" keyword.
2329 (c_finish_oacc_routine): Don't use %s to supply portions of the
2330 message.
2331
4227c9ad
JJ
23322017-02-24 Jakub Jelinek <jakub@redhat.com>
2333
2334 PR c++/79588
2335 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2336 handle -Wrestrict here.
2337 * c-typeck.c (build_function_call_vec): Adjust
2338 check_function_arguments caller.
2339
5d972e66
RB
23402017-02-23 Richard Biener <rguenther@suse.de>
2341
2342 PR c/79684
2343 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2344 to initialize c_exprs to return.
2345 (c_parser_gimple_binary_expression): Likewise.
2346 (c_parser_gimple_unary_expression): Likewise.
2347 (c_parser_gimple_postfix_expression): Likewise.
2348
61ac5ebe
MP
23492017-02-22 Marek Polacek <polacek@redhat.com>
2350
2351 PR c/79662
2352 * c-typeck.c (convert_arguments): Handle error_mark_node.
2353
41d1b0b1
PK
23542017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2355
2356 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2357 value of c_parser_parse_ssa_name against error_mark_node and emit
2358 error if ssa name is anonymous and written as default definition.
2359
eab1f169
PK
23602017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2361
2362 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2363 FMA_EXPR.
2364
bcac0b4d
JJ
23652017-02-16 Jakub Jelinek <jakub@redhat.com>
2366
2367 PR c++/79512
2368 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2369 ignore #pragma omp target even when not followed by identifier.
2370
1be33173
PK
23712017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2372
2373 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2374 (c_parser_gimple_unary_expression): Likewise.
2375
aa326bfb
JJ
23762017-02-13 Jakub Jelinek <jakub@redhat.com>
2377
2378 * c-parser.c (c_parser_oacc_declare): Add missing space in
2379 diagnostics.
2380
8a398bc5
PK
23812017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2382
2383 PR c/79478
2384 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2385 set_c_expr_source_range when parsing ssa-name.
2386
3dcde5ef 23872017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2388 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2389
2390 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2391 building IL when arguments are error_mark_node.
2392 (c_parser_gimple_unary_expression): Likewise.
2393 (c_parser_gimple_if_stmt): Likewise.
2394 (c_parser_gimple_switch_stmt): Likewise.
2395 (c_parser_gimple_return_stmt): Likewise.
2396 (c_parser_parse_ssa_name): When name lookup fails do not build
2397 an SSA name. Use undeclared rather than not declared in error
2398 reporting.
2399
192b048b
MP
24002017-02-09 Marek Polacek <polacek@redhat.com>
2401
2402 PR c/79428
2403 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2404 instead of c_parser_skip_until_found.
2405
56f71478
JJ
24062017-02-09 Jakub Jelinek <jakub@redhat.com>
2407
2408 PR c/79431
2409 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2410 symtab_node::get on automatic variables.
2411
02889d23
CLT
24122016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2413 Chung-Lin Tang <cltang@codesourcery.com>
2414
2415 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2416 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2417 semantic checking.
2418 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2419
7af4b20d
RB
24202017-02-07 Richard Biener <rguenther@suse.de>
2421
2422 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2423 (c_parser_gimple_postfix_expression_after_primary):
2424 Do not use c_build_function_call_vec to avoid folding and promotion.
2425 Simplify.
2426
e5e391d6
MO
24272017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2428
2429 PR lto/79061
2430 * c-decl.c (pop_scope): Pass main_input_filename to
2431 build_translation_unit_decl.
2432
c2e84327
DM
24332017-01-24 David Malcolm <dmalcolm@redhat.com>
2434
2435 * c-parser.c: Include "read-rtl-function.h" and
2436 "run-rtl-passes.h".
2437 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2438 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2439 production. Update for renaming of field "gimple_pass" to
2440 "gimple_or_rtl_pass". If __RTL was seen, call
2441 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2442 to an auto_timevar, to cope with early exit.
2443 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2444 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2445 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2446 Handle RID_RTL.
2447 (c_parser_parse_rtl_body): New function.
2448 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2449 (struct c_declspecs): Rename field "gimple_pass" to
2450 "gimple_or_rtl_pass". Add field "rtl_p".
2451 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2452 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2453 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2454 (c_parser_gimple_or_rtl_pass_list): ...this.
2455
2ebd93e1
MP
24562017-01-20 Marek Polacek <polacek@redhat.com>
2457
2458 PR c/64279
2459 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2460
b1c95bb5
RB
24612017-01-13 Richard Biener <rguenther@suse.de>
2462
2463 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2464 nops.
2465
25329913
RB
24662017-01-13 Richard Biener <rguenther@suse.de>
2467
2468 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2469 _Literal ( type-name ) number.
2470
6bb4ea5c
RB
24712017-01-12 Richard Biener <rguenther@suse.de>
2472
2473 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2474 __MEM.
2475
6b5b4e9c
JJ
24762017-01-11 Jakub Jelinek <jakub@redhat.com>
2477
2478 PR c++/72813
2479 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2480 PCH file.
2481
e3252775
RB
24822017-01-11 Richard Biener <rguenther@suse.de>
2483
2484 PR bootstrap/79052
2485 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2486 returns on parse errors.
2487
a9342885
MP
24882017-01-04 Marek Polacek <polacek@redhat.com>
2489
2490 PR c++/64767
2491 * c-parser.c (c_parser_postfix_expression): Mark zero character
2492 constants by setting original_type in c_expr.
2493 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2494 with a zero character constant.
2495 (char_type_p): New function.
2496
5dd9a9d0
DM
24972017-01-04 David Malcolm <dmalcolm@redhat.com>
2498
2499 * c-parser.c (c_parser_declaration_or_fndef): Create a
2500 rich_location at init_loc and parse it to start_init.
2501 (last_init_list_comma): New global.
2502 (c_parser_braced_init): Update last_init_list_comma when parsing
2503 commas. Pass it to pop_init_level. Pass location of closing
2504 brace to pop_init_level.
2505 (c_parser_postfix_expression_after_paren_type): Create a
2506 rich_location at type_loc and parse it to start_init.
2507 (c_parser_omp_declare_reduction): Likewise for loc.
2508 * c-tree.h (start_init): Add rich_location * param.
2509 (pop_init_level): Add location_t param.
2510 * c-typeck.c (struct initializer_stack): Add field
2511 "missing_brace_richloc".
2512 (start_init): Add richloc param, use it to initialize
2513 the stack node's missing_brace_richloc.
2514 (last_init_list_comma): New decl.
2515 (finish_implicit_inits): Pass last_init_list_comma to
2516 pop_init_level.
2517 (push_init_level): When finding missing open braces, add fix-it
2518 hints to the richloc.
2519 (pop_init_level): Add "insert_before" param and pass it
2520 when calling pop_init_level. Add fixits about missing
2521 close braces to any richloc. Use the richloc for the
2522 -Wmissing-braces warning.
2523 (set_designator): Pass last_init_list_comma to pop_init_level.
2524 (process_init_element): Likewise.
2525
cbe34bb5
JJ
25262017-01-01 Jakub Jelinek <jakub@redhat.com>
2527
2528 Update copyright years.
2529
d17680f3
JJ
25302016-12-21 Jakub Jelinek <jakub@redhat.com>
2531
0dba7960
JJ
2532 PR bootstrap/78817
2533 * c-typeck.c (build_function_call_vec): If check_function_arguments
2534 returns true, set TREE_NO_WARNING on CALL_EXPR.
2535
d17680f3
JJ
2536 PR c/77767
2537 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2538 to *expr instead of overwriting it.
2539
aa90531e
RB
25402016-12-20 Richard Biener <rguenther@suse.de>
2541
2542 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2543 error recovery.
2544 (c_parser_gimple_statement): Only build assigns for non-error
2545 stmts.
2546 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2547
629b3d75
MJ
25482016-12-14 Martin Jambor <mjambor@suse.cz>
2549
2550 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2551 omp-low.h.
2552 (c_finish_oacc_routine): Adjusted call to
2553 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2554 to use their new names.
2555 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2556 use its new name.
2557 (c_parser_oacc_update): Likewise.
2558 (c_parser_omp_simd): Likewise.
2559 (c_parser_omp_target_update): Likewise.
2560 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2561 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2562 name.
2563 (c_finish_omp_cancellation_point): Likewise.
2564 * gimple-parser.c: Do not include omp-low.h
2565
c5af52eb
CP
25662016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2567 James Norris <jnorris@codesourcery.com>
2568
2569 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2570 EXIT_DATA,WAIT} are not used in compound statements.
2571 (c_parser_oacc_enter_exit_data): Update diagnostics.
2572
48330c93
BE
25732016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2574
2575 PR c++/71973
2576 * c-decl.c (diagnose_mismatched_decls): Use
2577 OPT_Wbuiltin_declaration_mismatch here too.
2578
899ca90e 25792016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2580 Alan Hayward <alan.hayward@arm.com>
2581 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2582
2583 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2584 (make_label, finish_struct): Likewise.
2585
1ee62b92 25862016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2587 Richard Biener <rguenther@suse.de>
22b15758 2588
8e745a17
JJ
2589 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2590 * config-lang.in (gtfiles): Add c/c-parser.h.
2591 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2592 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2593 * c-parser.c (enum c_id_kind, struct c_token,
2594 c_parser_next_token_is, c_parser_next_token_is_not,
2595 c_parser_next_token_is_keyword,
2596 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2597 Split out to ...
2598 * c-parser.h: ... new header.
2599 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2600 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2601 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2602 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2603 c_parser_error, c_parser_require, c_parser_skip_until_found,
2604 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2605 c_parser_type_name): Export.
2606 (c_parser_tokens_buf): New function.
2607 (c_parser_error): Likewise.
2608 (c_parser_set_error): Likewise.
2609 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2610 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2611 via c_parser_parse_gimple_body.
8e745a17
JJ
2612 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2613 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2614 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2615 c_parser_error, c_parser_require, c_parser_skip_until_found,
2616 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2617 c_parser_type_name): Declare.
1ee62b92
PG
2618 (struct c_parser): Declare forward.
2619 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2620 (c_parser_error): Likewise.
2621 (c_parser_set_error): Likewise.
2622 * gimple-parser.c: New file.
2623 * gimple-parser.h: Likewise.
1ee62b92 2624
22b15758
UB
26252016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2626
2627 PR c/35503
2628 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2629 warn_for_restrict.
2630
84ff4775
LCW
26312016-09-11 Le-Chun Wu <lcwu@google.com>
2632 Mark Wielaard <mjw@redhat.com>
2633
2634 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2635 to the given -Wshadow= variant.
2636
4d0cdd0c
TP
26372016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2638
2639 * c-typeck.c: Include memmodel.h.
2640
1202f33e
JJ
26412016-10-13 Jakub Jelinek <jakub@redhat.com>
2642
2643 PR target/77957
2644 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2645 instead of lhd_return_null_tree_v.
2646
8a14afd0
BS
26472016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2648
2649 PR c++/69733
2650 * c-decl.c (smallest_type_quals_location): New static function.
2651 (grokdeclarator): Try to find the correct location for an ignored
2652 qualifier.
2653
81fea426
MP
26542016-09-26 Marek Polacek <polacek@redhat.com>
2655
2656 PR c/7652
2657 * c-decl.c (pop_scope): Add gcc_fallthrough.
2658
26592016-09-26 Marek Polacek <polacek@redhat.com>
2660
2661 PR c/7652
2662 * c-parser.c (struct c_token): Add flags field.
2663 (c_lex_one_token): Pass it to c_lex_with_flags.
2664 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2665 into IFN_FALLTHROUGH.
2666 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2667 attribute fallthrough after a case label or default label.
2668 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2669
9a2300e9
MP
26702016-09-24 Marek Polacek <polacek@redhat.com>
2671
2672 PR c/77490
2673 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2674 have boolean value. Warn about ++/-- on booleans.
2675
7de76362
JJ
26762016-09-23 Jakub Jelinek <jakub@redhat.com>
2677
2678 * c-parser.c (incomplete_record_decls): Remove unnecessary
2679 = vNULL initialization of file scope vec.
2680
5b73d2ab
MP
26812016-09-16 Marek Polacek <polacek@redhat.com>
2682
2683 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2684
e51fbec3
MP
26852016-09-14 Marek Polacek <polacek@redhat.com>
2686
2687 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2688 (fix_array_notation_expr): Likewise.
2689 * c-decl.c (finish_decl): Likewise.
2690 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2691 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2692 (function_to_pointer_conversion): Use false instead of 0.
2693 (convert_lvalue_to_rvalue): Likewise.
2694 (parser_build_unary_op): Likewise.
2695 (build_atomic_assign): Likewise.
2696 (build_unary_op): Change nonconvert parameter type to bool, use
2697 true/false instead of 1/0.
2698 (build_binary_op): Use true instead of 1.
2699
254830ba
DM
27002016-09-13 David Malcolm <dmalcolm@redhat.com>
2701
2702 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2703 of add_fixit_insert to add_fixit_insert_before.
2704
4c13ba17
MP
27052016-09-13 Marek Polacek <polacek@redhat.com>
2706
2707 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2708 it.
2709
54dcdb88
BE
27102016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2711
2712 PR c++/77496
2713 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2714 COMPOUND_EXPR to warn_for_omitted_condop.
2715
e5106e27
DM
27162016-09-07 David Malcolm <dmalcolm@redhat.com>
2717
2718 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2719 c_get_substring_location for this new langhook.
2720
9dc5773f
JJ
27212016-09-02 Jakub Jelinek <jakub@redhat.com>
2722
2723 PR c/65467
2724 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2725 flag_openmp.
2726 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2727 instead of mark_exp_read on low_bound/length expression.
2728 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2729 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2730 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2731 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2732 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2733 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2734 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2735 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2736 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2737 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2738 instead of mark_expr_read.
2739 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2740 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2741 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2742 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2743 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2744 array section bases outside of depend clause, for depend clause
2745 use convert_lvalue_to_rvalue on the base.
2746 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2747 linear, aligned, map, to and from clauses.
2748 (c_omp_clause_copy_ctor): New function.
2749
295844f6
MP
27502016-09-01 Marek Polacek <polacek@redhat.com>
2751
2752 PR c/7652
2753 * c-typeck.c (composite_type): Add FALLTHRU comment.
2754
089af25c
DM
27552016-08-31 David Malcolm <dmalcolm@redhat.com>
2756
2757 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2758 to the insertion fixits for "struct", "union", and "enum".
2759
f9087798
DM
27602016-08-30 David Malcolm <dmalcolm@redhat.com>
2761
2762 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2763 rather than add_fixit_misspelled_id.
2764 (undeclared_variable): Likewise.
2765 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2766 now-redundant "here" params from add_fixit_insert method calls.
2767 (c_parser_parameter_declaration): Likewise.
2768 * c-typeck.c (build_component_ref): Remove now-redundant range
2769 param from add_fixit_replace method calls.
2770
ebef225f
MP
27712016-08-25 Marek Polacek <polacek@redhat.com>
2772
2773 * c-typeck.c (parser_build_binary_op): Pass LHS to
2774 warn_logical_not_parentheses.
2775
fe377a48
MP
27762016-08-25 Marek Polacek <polacek@redhat.com>
2777
2778 PR c/77323
2779 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2780 or _FloatN or _FloatNx is not supported.
2781 (finish_declspecs): Set type to integer_type_node when _FloatN or
2782 _FloatNx is not supported.
2783
c65699ef
JM
27842016-08-19 Joseph Myers <joseph@codesourcery.com>
2785
2786 PR c/32187
2787 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2788 (struct c_declspecs): Add field floatn_nx_idx.
2789 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2790 and _FloatNx type specifiers.
2791 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2792 (c_parser_declspecs, c_parser_attribute_any_word)
2793 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2794 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2795 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2796 narrower than double.
2797
2f1364c2
JJ
27982016-08-12 Jakub Jelinek <jakub@redhat.com>
2799 Martin Liska <mliska@suse.cz>
2800
2801 PR c/67410
2802 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2803 % to determine val element to change. Assert that
2804 wchar_bytes * charwidth fits into val array.
2805
191816a3
MP
28062016-08-12 Marek Polacek <polacek@redhat.com>
2807
2808 PR c/7652
2809 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2810 (c_parser_postfix_expression): Likewise.
2811 * c-typeck.c (build_unary_op): Adjust fall through comment.
2812 (c_mark_addressable): Likewise.
2813
b95a64bb
JJ
28142016-08-11 Jakub Jelinek <jakub@redhat.com>
2815
2816 PR c/72816
2817 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2818 array member through typedef, for orig_qual_indirect == 0 clear
2819 orig_qual_type.
2820
895aa8e1
DM
28212016-08-08 David Malcolm <dmalcolm@redhat.com>
2822
2823 PR c/64955
2824 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2825 this up to selftest::run_c_tests.
2826 (selftest::run_c_tests): New function.
2827
0b212d8c
TS
28282016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2829
ae9281fc
TS
2830 * c-parser.c (struct oacc_routine_data): Add error_seen and
2831 fndecl_seen members.
2832 (c_finish_oacc_routine): Use these.
2833 (c_parser_declaration_or_fndef): Adjust.
2834 (c_parser_oacc_routine): Likewise. Support more C language
2835 constructs, and improve diagnostics. Move pragma context
2836 checking...
2837 (c_parser_pragma): ... here.
2838
0b212d8c
TS
2839 * c-parser.c (struct oacc_routine_data): New.
2840 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2841 Simplify code.
2842 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2843 declare target" attribute.
2844
76e2c821
JB
28452016-08-01 Jan Beulich <jbeulich@suse.com>
2846
2847 * c-fold.c (c_fully_fold_internal): Also emit shift count
2848 warnings for vector types.
2849 * c-typeck.c (build_binary_op): Likewise.
2850
f618a472
MP
28512016-07-29 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/71742
2854 * c-decl.c (finish_struct): Rephrase an error message.
2855
efd0786f
MP
2856 PR c/71853
2857 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2858 to error node for invalid code.
2859
e00dceaf
MP
2860 PR c/71573
2861 * c-decl.c (implicitly_declare): Return decl early not only for
2862 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2863
673a107a
JJ
28642016-07-29 Jakub Jelinek <jakub@redhat.com>
2865
2866 PR c/71969
2867 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2868 on GNU extern inline functions.
2869
a5b5c8b6
MP
28702016-07-29 Marek Polacek <polacek@redhat.com>
2871
2872 PR c/71583
2873 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2874 check expr.value.
2875
e3fe09c1
UB
28762016-07-22 Uros Bizjak <ubizjak@gmail.com>
2877
2878 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2879
7c8f7eaa
DM
28802016-07-20 David Malcolm <dmalcolm@redhat.com>
2881
2882 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2883 spellcheck-tree.h
2884 (best_macro_match): Likewise, converting from a typedef to a
2885 subclass.
2886 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2887 (lookup_name_fuzzy): Update for change of best_macro_match to a
2888 subclass with a ctor that calls cpp_forall_identifiers.
2889
de6a69ee
DM
28902016-07-20 David Malcolm <dmalcolm@redhat.com>
2891
2892 * c-decl.c (implicit_decl_warning): Update for conversion of
2893 return type of lookup_name_fuzzy to const char *.
2894 (undeclared_variable): Likewise.
2895 (lookup_name_fuzzy): Convert return type from tree to
2896 const char *.
2897 * c-parser.c (c_parser_declaration_or_fndef): Update for
2898 conversion of return type of lookup_name_fuzzy to const char *.
2899 (c_parser_parameter_declaration): Likewise.
2900
b1c9c068
CP
29012016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2902
2903 * c-parser.c (c_parser_oacc_declare): Don't scan for
2904 GOMP_MAP_POINTER.
2905 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2906 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2907 zero-length subarrays.
2908
ddbbcb19
JJ
29092016-07-15 Jakub Jelinek <jakub@redhat.com>
2910
2911 PR c/71858
2912 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2913 instead of FUZZY_LOOKUP_NAME.
2914 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2915 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2916
dd36b877
JJ
29172016-07-14 Jakub Jelinek <jakub@redhat.com>
2918
2919 PR c/71858
2920 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2921
8c681247
TS
29222016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2923
2924 * c-parser.c (c_parser_generic_selection): Make type of variable
2925 auto_vec.
2926 (c_parser_omp_declare_simd): Likewise.
2927
bf4fa671
TS
29282016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2929
2930 * c-decl.c (struct c_struct_parse_info): Change member types
2931 from vec to auto_vec.
2932 (start_struct): Adjust.
2933 (finish_struct): Likewise.
2934
557e8c49
JJ
29352016-07-02 Jakub Jelinek <jakub@redhat.com>
2936
2937 PR c/71719
2938 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2939
54d19c3b
TS
29402016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2941
2942 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2943 Move pragma context checking into...
2944 (c_parser_omp_cancellation_point): ... here, and improve
2945 diagnostic messages.
2946 * c-typeck.c (c_finish_omp_cancel)
2947 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2948
152ef731
JJ
29492016-06-29 Jakub Jelinek <jakub@redhat.com>
2950
2951 PR c/71685
2952 * c-typeck.c (c_build_qualified_type): Don't clear
2953 C_TYPE_INCOMPLETE_VARS for the main variant.
2954
29552016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2956
2957 PR c/71552
2958 * c-typeck.c (output_init_element): Diagnose incompatible types
2959 before non-constant initializers.
2960
e9ac1f86
JJ
29612016-06-28 Jakub Jelinek <jakub@redhat.com>
2962
2963 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2964
277d7ee0
AK
29652016-06-23 Andi Kleen <ak@linux.intel.com>
2966
2967 * Make-lang.in: Add support for autofdo.
2968
1a4f11c8
DM
29692016-06-22 David Malcolm <dmalcolm@redhat.com>
2970
2971 PR c/70339
2972 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2973 (implicit_decl_warning): When issuing warnings for implicit
2974 declarations, attempt to provide a suggestion via
2975 lookup_name_fuzzy.
2976 (undeclared_variable): Likewise when issuing errors.
2977 (lookup_name_in_scope): Likewise.
2978 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2979 (best_macro_match): New typedef.
2980 (find_closest_macro_cpp_cb): New function.
2981 (lookup_name_fuzzy): New function.
2982 * c-parser.c: Include gcc-rich-location.h.
2983 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2984 (c_keyword_starts_typename): ...this new function.
2985 (c_parser_declaration_or_fndef): When issuing errors about
2986 missing "struct" etc, add a fixit. For other kinds of errors,
2987 attempt to provide a suggestion via lookup_name_fuzzy.
2988 (c_parser_parms_declarator): When looking ahead to detect typos in
2989 type names, also reject CPP_KEYWORD.
2990 (c_parser_parameter_declaration): When issuing errors about
2991 unknown type names, attempt to provide a suggestion via
2992 lookup_name_fuzzy.
2993 * c-tree.h (c_keyword_starts_typename): New prototype.
2994
5a578671
JM
29952016-06-20 Joseph Myers <joseph@codesourcery.com>
2996
2997 PR c/71601
2998 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2999 c_common_type returns error_mark_node.
3000
3f8257db 30012016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3002
3003 PR c/69507
3004 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3005 __alignof__ (expression).
3006
6a3f203c
DM
30072016-06-14 David Malcolm <dmalcolm@redhat.com>
3008
3009 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3010
264757fb
DM
30112016-06-14 David Malcolm <dmalcolm@redhat.com>
3012
3013 * c-typeck.c (build_component_ref): Simplify fixit code by
3014 using gcc_rich_location::add_fixit_misspelled_id.
3015 (set_init_label): Likewise.
3016
f7e4f2e3
DM
30172016-06-13 David Malcolm <dmalcolm@redhat.com>
3018
3019 * c-parser.c (c_parser_initelt): Provide location of name for new
3020 location_t param of set_init_label.
3021 * c-tree.h (set_init_label): Add location_t param.
3022 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3023 param and use it when issuing error messages about unrecognized
3024 field names. Attempt to provide a fixit hint if appropriate,
3025 otherwise update the error message to provide the type name.
3026
4b1ffdb1
TS
30272016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3028
3029 PR c/71381
3030 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3031 Loosen checking.
3032
44a845ca
MS
30332016-06-08 Martin Sebor <msebor@redhat.com>
3034 Jakub Jelinek <jakub@redhat.com>
3035
3036 PR c++/70507
3037 PR c/68120
3038 * c-typeck.c (convert_arguments): Don't promote last argument
3039 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3040
92a5f2ba
MP
30412016-06-08 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/71418
3044 * c-decl.c (grokdeclarator): Check TYPE_P.
3045
08203f73
MP
3046 PR c/71426
3047 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3048 code.
3049
6ffd47b7
DM
30502016-06-07 David Malcolm <dmalcolm@redhat.com>
3051
3052 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3053 and structure element reference, capture the location of the
3054 element name token and pass it to build_component_ref.
3055 (c_parser_postfix_expression_after_primary): Likewise for
3056 structure element dereference.
3057 (c_parser_omp_variable_list): Likewise for
3058 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3059 * c-tree.h (build_component_ref): Add location_t param.
3060 * c-typeck.c (build_component_ref): Add location_t param
3061 COMPONENT_LOC. Use it, if available, when issuing hints about
3062 mispelled member names to provide a fixit replacement hint.
3063
1f40cff3
MP
30642016-06-06 Marek Polacek <polacek@redhat.com>
3065
3066 PR c/71362
3067 * c-parser.c (c_parser_direct_declarator): Set location.
3068
5545a907
MP
30692016-06-06 Marek Polacek <polacek@redhat.com>
3070
3071 * c-typeck.c (comptypes_internal): Handle comparisons of
3072 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3073 TYPE_REF_CAN_ALIAS_ALL.
3074
b605f663
CLT
30752016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3076
3077 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3078 arguments as addressable when async clause exists.
3079
00631022
JJ
30802016-05-30 Jakub Jelinek <jakub@redhat.com>
3081
3082 PR c++/71349
3083 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3084 when combined with target construct.
3085
7211a097
JJ
30862016-05-26 Jakub Jelinek <jakub@redhat.com>
3087
3088 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3089 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3090
95efe6b6
MP
30912016-05-25 Marek Polacek <polacek@redhat.com>
3092
3093 PR c/71265
3094 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3095
a23faf7a
MP
3096 PR c/71266
3097 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3098
e46c7770
CP
30992016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3100
3101 * c-parser.c (c_parser_oacc_declare): Add support for
3102 GOMP_MAP_FIRSTPRIVATE_POINTER.
3103 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3104 argument with enum c_omp_region_type ort.
3105 (handle_omp_array_sections): Likewise. Update call to
3106 handle_omp_array_sections_1.
3107 (c_finish_omp_clauses): Add specific errors and warning messages for
3108 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3109 call to handle_omp_array_sections.
3110
a04e69c0
TS
31112016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3112
3113 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3114
f17a223d
RB
31152016-05-24 Richard Biener <rguenther@suse.de>
3116
3117 PR middle-end/70434
3118 PR c/69504
3119 * c-typeck.c (build_array_ref): Do not complain about indexing
3120 non-lvalue vectors. Adjust for function name change.
3121
79063edd
MS
31222016-05-20 Martin Sebor <msebor@redhat.com>
3123
3124 PR c/71115
3125 * c-typeck.c (error_init): Use
3126 expansion_point_location_if_in_system_header.
3127 (warning_init): Same.
3128
8a40fef3
DM
31292016-05-19 David Malcolm <dmalcolm@redhat.com>
3130
3131 PR c/71171
3132 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3133 in error-handling.
3134 (c_parser_postfix_expression): Likewise.
3135 * c-tree.h (c_expr::set_error): New method.
3136 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3137 that result's range is initialized.
3138
e9892350
JG
31392016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3140
3141 * c-typeck.c (parser_build_unary_op): Fix formatting.
3142
8fad45f5
MW
31432016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3144
3145 * c-decl.c (grokdeclarator): Remove errmsg and use of
3146 targetm.invalid_return_type.
3147 (grokparms): Remove errmsg and use of
3148 targetm.invalid_parameter_type.
3149
aa4b467b
JM
31502016-05-13 Joseph Myers <joseph@codesourcery.com>
3151
3152 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3153 function return type.
3154
4f2e1536
MP
31552016-05-12 Marek Polacek <polacek@redhat.com>
3156
3157 PR c/70756
3158 * c-decl.c (build_compound_literal): Pass LOC down to
3159 c_incomplete_type_error.
3160 * c-tree.h (require_complete_type): Adjust declaration.
3161 (c_incomplete_type_error): Likewise.
3162 * c-typeck.c (require_complete_type): Add location parameter, pass it
3163 down to c_incomplete_type_error.
3164 (c_incomplete_type_error): Add location parameter, pass it down to
3165 error_at.
3166 (build_component_ref): Pass location down to c_incomplete_type_error.
3167 (default_conversion): Pass location down to require_complete_type.
3168 (build_array_ref): Likewise.
3169 (build_function_call_vec): Likewise.
3170 (convert_arguments): Likewise.
3171 (build_unary_op): Likewise.
3172 (build_c_cast): Likewise.
3173 (build_modify_expr): Likewise.
3174 (convert_for_assignment): Likewise.
3175 (c_finish_omp_clauses): Likewise.
3176
d6e83a8d
MM
31772016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3178
3179 PR c/43651
3180 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3181 is enabled.
3182 * c-errors.c (pedwarn_c90): Return true if warned.
3183 * c-tree.h (pedwarn_c90): Change return type to bool.
3184 (enum c_declspec_word): Add new enumerator cdw_atomic.
3185
5c3a10fb
MP
31862016-05-11 Marek Polacek <polacek@redhat.com>
3187
3188 PR c++/71024
3189 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3190 diagnose_mismatched_attributes and call it.
3191
cf68d92c
MP
31922016-05-10 Marek Polacek <polacek@redhat.com>
3193
3194 PR c/70255
3195 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3196 on a declaration following the definition.
3197
351f85c5
JJ
31982016-05-05 Jakub Jelinek <jakub@redhat.com>
3199
3200 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3201 parse it through to c_parser_c99_block_statement.
3202 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3203 caller.
3204
deef7113
MP
32052016-05-04 Marek Polacek <polacek@redhat.com>
3206
3207 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3208 OPT_Wdangling_else.
3209
de55efd5
MP
32102016-05-04 Marek Polacek <polacek@redhat.com>
3211
3212 PR c/48778
3213 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3214 for macro expansions.
3215
79ce98bc
MP
32162016-05-03 Marek Polacek <polacek@redhat.com>
3217
3218 PR c/70859
3219 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3220 check_builtin_function_arguments.
3221
fb2647aa
RB
32222016-05-03 Richard Biener <rguenther@suse.de>
3223
3224 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3225 the checksum from the previous stage.
3226
77886428
CP
32272016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3228
3229 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3230 c_finish_omp_clauses.
3231 (c_parser_omp_all_clauses): Likewise.
3232 (c_parser_oacc_cache): Likewise.
3233 (c_parser_oacc_loop): Likewise.
3234 (omp_split_clauses): Likewise.
3235 (c_parser_omp_declare_target): Likewise.
3236 (c_parser_cilk_all_clauses): Likewise.
3237 (c_parser_cilk_for): Likewise.
3238 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3239 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3240
7176a4a0
MP
32412016-05-02 Marek Polacek <polacek@redhat.com>
3242
3243 PR c/70851
3244 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3245 incomplete type.
3246
e7ff0319
CP
32472016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3248
3249 PR middle-end/70626
3250 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3251 OACC_LOOP_CLAUSE_MASK.
3252 (c_parser_oacc_kernels_parallel): Update call to
3253 c_oacc_split_loop_clauses.
3254
9f405ce1
AM
32552016-04-28 Andrew MacLeod <amacleod@redhat.com>
3256
3257 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3258 argument to build_modify_expr in two cases.
3259
c1e1f433
BS
32602016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3261
3262 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3263 warn_for_memset instead of warning directly here.
3264
2448a956
MP
32652016-04-26 Marek Polacek <polacek@redhat.com>
3266
3267 PR c/67784
3268 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3269 out of ...
3270 (c_parser_for_statement): ... here.
3271 (c_parser_if_statement): Use it.
3272 (c_parser_switch_statement): Use it.
3273 (c_parser_while_statement): Use it.
3274
b02a5e26
MP
3275 PR c/70791
3276 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3277
477d4906
IV
32782016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3279
3280 PR c++/69363
3281 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3282 instead of c_finish_cilk_clauses.
3283 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3284 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3285 floating-point variables in the linear clause for Cilk Plus.
3286
fe37c7af
MM
32872016-04-18 Michael Matz <matz@suse.de>
3288
3289 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3290 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3291
949505a9
MP
32922016-04-15 Marek Polacek <polacek@redhat.com>
3293
3294 PR c/70671
3295 * c-typeck.c (build_unary_op): Pass location down to error and
3296 warning call.
3297
dda1bf61
JJ
32982016-04-15 Jakub Jelinek <jakub@redhat.com>
3299
3300 PR c/70436
3301 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3302 where needed.
3303 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3304 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3305 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3306 Adjust c_parser_pragma callers.
3307 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3308 caller.
3309 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3310 c_parser_statement.
3311 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3312 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3313 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3314 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3315 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3316 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3317 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3318 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3319 down where needed.
3320 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3321 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3322 calls.
3323
99cd9857
MP
33242016-04-13 Marek Polacek <polacek@redhat.com>
3325
3326 PR c/70436
3327 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3328 adjust callers.
3329 (c_parser_statement): Likewise.
3330 (c_parser_c99_block_statement): Likewise.
3331 (c_parser_while_statement): Likewise.
3332 (c_parser_for_statement): Likewise.
3333 (c_parser_if_body): Don't set IF_P here.
3334 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3335 about dangling else here.
3336 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3337 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3338 warn about dangling else here.
3339
f13355da
MP
33402016-04-04 Marek Polacek <polacek@redhat.com>
3341
3342 PR c/70307
3343 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3344
5fde6a45
MP
33452016-03-31 Marek Polacek <polacek@redhat.com>
3346
3347 PR c/70297
3348 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3349
4bbf545b
DM
33502016-03-18 David Malcolm <dmalcolm@redhat.com>
3351
3352 PR c/70281
3353 * c-parser.c (c_parser_postfix_expression): Set the source range
3354 for uses of "__builtin_types_compatible_p".
3355
fcc2b74f
JJ
33562016-03-17 Jakub Jelinek <jakub@redhat.com>
3357
3358 PR c/70280
3359 * c-typeck.c (composite_type): Don't count void_list_node
3360 into len, if the list is terminated by void_list_node, start
3361 with void_list_node instead of NULL for newargs. Stop
3362 at void_list_node.
3363
ab4c578f
MP
33642016-03-16 Marek Polacek <polacek@redhat.com>
3365
3366 PR c/70093
3367 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3368 nested functions returning VM types.
3369
96b3c82d
CP
33702016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3371
3372 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3373 when calling c_finish_omp_clauses.
3374
29b9828f
BS
33752016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3376
3377 PR c/69824
3378 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3379 for later.
3380
7ff6ca38
MP
33812016-03-04 Marek Polacek <polacek@redhat.com>
3382
3383 PR c/69798
3384 * c-parser.c (c_parser_postfix_expression): Call
3385 c_parser_cast_expression rather than c_parser_postfix_expression.
3386
686e2237
JJ
33872016-03-01 Jakub Jelinek <jakub@redhat.com>
3388
3389 PR c/69796
3390 PR c/69974
3391 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3392 of incomplete decls to error_mark_node.
3393
0b05329b
MP
33942016-02-24 Marek Polacek <polacek@redhat.com>
3395
3396 PR c/69819
3397 * c-decl.c (finish_decl): Don't update the copy of the type of a
3398 different decl type.
3399
067fbd8b
JJ
34002016-02-23 Jakub Jelinek <jakub@redhat.com>
3401
3402 PR objc/69844
3403 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3404 in id_kind reclassification.
3405
bf14eba2
JJ
34062016-02-16 Jakub Jelinek <jakub@redhat.com>
3407
3408 PR c/69835
3409 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3410
ba539195
JN
34112016-02-16 James Norris <jnorris@codesourcery.com>
3412
3413 PR c/64748
3414 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3415
16595a1f
BS
34162016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3417
f48dfe98
BS
3418 * c-decl.c (build_null_declspecs): Zero the entire struct.
3419
16595a1f
BS
3420 PR c/69522
3421 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3422 callers changed. If nested_p is true, use it to call
3423 finish_implicit_inits.
3424 * c-tree.h (finish_implicit_inits): Declare.
3425 * c-typeck.c (finish_implicit_inits): New function. Move code
3426 from ...
3427 (push_init_level): ... here.
3428 (set_designator, process_init_element): Call finish_implicit_inits.
3429
66756373
JJ
34302016-02-11 Jakub Jelinek <jakub@redhat.com>
3431
3432 PR c/69768
3433 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3434 arguments for -Waddress warning.
3435
1066e9b5
JJ
34362016-02-04 Jakub Jelinek <jakub@redhat.com>
3437
3438 PR c/69669
3439 * c-decl.c (finish_enum): When honoring mode attribute,
3440 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3441
3a5d2ba4
JJ
34422016-01-29 Jakub Jelinek <jakub@redhat.com>
3443
3444 PR debug/69518
3445 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3446 all type variants, not just TYPE_MAIN_VARIANT.
3447
cbdd8ae0
JJ
34482016-01-27 Jakub Jelinek <jakub@redhat.com>
3449
3450 PR debug/66869
3451 * c-decl.c (c_write_global_declarations_1): Warn with
3452 warn_unused_function if static prototype without definition
3453 is not C_DECL_USED.
3454
fa74a4bc
MP
34552016-01-27 Marek Polacek <polacek@redhat.com>
3456
3457 PR c/68062
3458 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3459 to unsigned, if needed. Add -Wsign-compare warning.
3460
13f92e8d
JJ
34612016-01-26 Jakub Jelinek <jakub@redhat.com>
3462
3463 PR tree-optimization/69483
3464 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3465
cd8e73dc 34662016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3467
3468 PR c/24293
3469 * c-tree.h (incomplete_record_decls): Declare.
3470 * c-parser.c (incomplete_record_decls): Define.
3471 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3472 report error if any decl has zero size.
3473 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3474 or enum type to incomplete_record_decls.
3475
e6d6ec9e
TV
34762016-01-14 Tom de Vries <tom@codesourcery.com>
3477
3478 PR tree-optimization/68773
3479 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3480 set force_output.
3481
00083992
MP
34822016-01-14 Marek Polacek <polacek@redhat.com>
3483
3484 PR c/69262
3485 * c-decl.c (grokdeclarator): Provide more information for invalid
3486 array declarations.
3487
7443cf13
DM
34882016-01-06 David Malcolm <dmalcolm@redhat.com>
3489
3490 * c-parser.c (c_parser_unary_expression): For dereferences, build
3491 a combined location before calling build_indirect_ref, so that
3492 error reports cover the full range, manually updating the c_expr
3493 src_range.
3494
6b131d5b
MP
34952016-01-06 Marek Polacek <polacek@redhat.com>
3496
3497 PR sanitizer/69099
3498 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3499 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3500 NULL.
3501
818ab71a
JJ
35022016-01-04 Jakub Jelinek <jakub@redhat.com>
3503
3504 Update copyright years.
3505
2fe0a208
MP
35062016-01-04 Marek Polacek <polacek@redhat.com>
3507
3508 PR c/68908
3509 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3510 optimization to use __atomic_fetch_* built-in if possible.
3511
c7b48c8a
TS
35122015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3513
3514 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3515 into...
3516 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3517 all users.
3518
fda5652f
MP
35192015-12-22 Marek Polacek <polacek@redhat.com>
3520
3521 PR c/69002
3522 * c-typeck.c (build_component_ref): Warn when acessing elements of
3523 atomic structures or unions.
3524
745e411d
DM
35252015-12-21 David Malcolm <dmalcolm@redhat.com>
3526
3527 * c-typeck.c: Include "gcc-rich-location.h".
3528 (build_binary_op): In the two places that call binary_op_error,
3529 create a gcc_rich_location and populate it with the location of
3530 the binary op and its two operands.
3531
94c40e19
DM
35322015-12-16 David Malcolm <dmalcolm@redhat.com>
3533
3534 * c-parser.c (c_parser_statement_after_labels): When calling
3535 c_finish_return, Use the return expression's location if it has
3536 one, falling back to the location of the first token within it.
3537 * c-typeck.c (c_finish_return): When issuing warnings about
3538 the incorrect presence/absence of a return value, issue a note
3539 showing the declaration of the function.
3540
de67c4c3
DM
35412015-12-16 David Malcolm <dmalcolm@redhat.com>
3542
3543 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3544 to 4.
3545 (c_parser_peek_nth_token): New function.
3546 (c_parser_peek_conflict_marker): New function.
3547 (c_parser_error): Detect conflict markers and report them as such.
3548
a10704e1
DM
35492015-12-16 David Malcolm <dmalcolm@redhat.com>
3550
3551 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3552 to preserve range information for the primary expression
3553 in the call to c_parser_postfix_expression_after_primary.
3554
8062bca6
DM
35552015-12-16 David Malcolm <dmalcolm@redhat.com>
3556
3557 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3558 expression location, falling back on the first token location,
3559 rather than always using the latter.
3560
d06f8b75
MP
35612015-12-16 Marek Polacek <polacek@redhat.com>
3562
3563 PR c/64637
3564 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3565 available.
3566
2994fb91
MP
35672015-12-15 Marek Polacek <polacek@redhat.com>
3568
3569 PR c/68907
3570 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3571 artificial decl.
3572
a1b93f8d
DM
35732015-12-08 David Malcolm <dmalcolm@redhat.com>
3574
3575 * c-parser.c (c_parser_alignof_expression): Capture location of
3576 closing parenthesis (if any), or of end of unary expression, and
3577 use it to build a src_range for the expression.
3578
46c6e1e2
DM
35792015-12-08 David Malcolm <dmalcolm@redhat.com>
3580
3581 PR c/68757
3582 * c-parser.c (c_parser_get_builtin_args): Add
3583 "out_close_paren_loc" param, and write back to it.
3584 (c_parser_postfix_expression): Capture the closing
3585 parenthesis location for RID_CHOOSE_EXPR,
3586 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3587 RID_BUILTIN_SHUFFLE and use it to set the source range
3588 for such expressions; within RID_BUILTIN_COMPLEX set
3589 the underlying location.
3590
66189108
MP
35912015-12-07 Marek Polacek <polacek@redhat.com>
3592
3593 PR c/68668
3594 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3595 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3596
f187980b
EB
35972015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3598
3599 * c-tree.h (c_build_va_arg): Adjust prototype.
3600 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3601 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3602 parameter, adjust throughout and issue an error if EXPR is a component
3603 with reverse storage order.
3604
4250754e
JM
36052015-12-02 Jason Merrill <jason@redhat.com>
3606
3607 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3608 (c_fully_fold_internal, decl_constant_value_for_optimization):
3609 Move from c-common.c.
3610 * c-tree.h: Declare decl_constant_value_for_optimization.
3611 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3612
e9e32ee6
JM
36132015-12-02 Joseph Myers <joseph@codesourcery.com>
3614
3615 PR c/68162
3616 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3617 following link from declarator to next declarator. Track original
3618 qualified type and pass it to c_build_qualified_type.
3619 * c-typeck.c (c_build_qualified_type): Add arguments
3620 orig_qual_type and orig_qual_indirect.
3621
ff7a55bf
TS
36222015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3623
3624 * c-parser.c (c_parser_omp_clause_name)
3625 (c_parser_oacc_all_clauses): Alphabetical sorting.
3626
657e4e47
JJ
36272015-12-02 Jakub Jelinek <jakub@redhat.com>
3628
3629 PR c/68533
3630 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3631 for diagnostics.
3632
37d5ad46
JB
36332015-12-01 Julian Brown <julian@codesourcery.com>
3634 Cesar Philippidis <cesar@codesourcery.com>
3635 James Norris <James_Norris@mentor.com>
3636
3637 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3638 (c_parser_oacc_clause_use_device): New function.
3639 (c_parser_oacc_all_clauses): Add use_device support.
3640 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3641 (c_parser_oacc_host_data): New function.
3642 (c_parser_omp_construct): Add host_data support.
3643 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3644 * c-typeck.c (c_finish_oacc_host_data): New function.
3645 (c_finish_omp_clauses): Add use_device support.
3646
a4850ce9
JH
36472015-11-29 Jan Hubicka <hubicka@ucw.cz>
3648
3649 PR c/67106
3650 * c-decl.c: Set TYPE_PACKED in variants.
3651
b58d3df2
ML
36522015-11-27 Martin Liska <mliska@suse.cz>
3653
3654 PR c++/68312
3655 * c-array-notation.c (fix_builtin_array_notation_fn):
3656 Use release_vec_vec instead of vec::release.
3657 (build_array_notation_expr): Likewise.
3658 (fix_conditional_array_notations_1): Likewise.
3659 (fix_array_notation_expr): Likewise.
3660 (fix_array_notation_call_expr): Likewise.
3661
aec17bfe
JJ
36622015-11-27 Jakub Jelinek <jakub@redhat.com>
3663
3664 PR c/63326
3665 * c-parser.c (c_parser_compound_statement_nostart): If
3666 last_label is true, use pragma_stmt instead of pragma_compound
3667 as second c_parser_pragma argument.
3668 (c_parser_omp_ordered, c_parser_omp_target_update,
3669 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3670 false as second argument to c_parser_skip_to_pragma_eol after
3671 diagnosing standalone directives used in pragma_stmt context.
3672
688c4de0
IV
36732015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3674
3675 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3676 with "if (ENABLE_OFFLOADING)".
3677
cbd03aee
DM
36782015-11-23 David Malcolm <dmalcolm@redhat.com>
3679
3680 PR objc/68438
3681 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3682 for various Objective-C constructs: Class.name syntax,
3683 @selector(), @protocol(), @encode(), and [] message syntax.
3684
a87a86e1
DM
36852015-11-20 David Malcolm <dmalcolm@redhat.com>
3686
3687 PR 62314
3688 * c-typeck.c (should_suggest_deref_p): New function.
3689 (build_component_ref): Special-case POINTER_TYPE when
3690 generating a "not a structure of union" error message, and
3691 suggest a "->" rather than a ".", providing a fix-it hint.
3692
8ece8dfb
DM
36932015-11-19 David Malcolm <dmalcolm@redhat.com>
3694
3695 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3696 candidate into a new function, find_closest_identifier.
3697
433068cc
MP
36982015-11-19 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/68412
3701 * c-typeck.c (parser_build_binary_op): Properly handle
3702 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3703
bef08b71
DM
37042015-11-17 David Malcolm <dmalcolm@redhat.com>
3705
3706 * c-parser.c (set_c_expr_source_range): Bulletproof both
3707 overloaded implementations against NULL expr->value.
3708 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3709 values.
3710 (c_parser_unary_expression): Likewise when handling addresses of
3711 labels.
3712 (c_parser_postfix_expression): Likewise for statement expressions,
3713 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3714 __builtin_va_arg, and for __builtin_offset_of.
3715 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3716 src_range using the range of the braced initializer.
3717 (c_parser_transaction_expression): Set src_range for "ret" to a
3718 sane pair of values.
3719
fff77217
KY
37202015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3721
3722 * c-parser.c (c_finish_omp_declare_simd): Look for
3723 "simd" attribute as well. Update error message.
3724
1d899da2
TS
37252015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3726
3727 * c-parser.c (c_parser_omp_declare_target): Adjust.
3728
e4606348
JJ
37292015-11-14 Jakub Jelinek <jakub@redhat.com>
3730
3731 * c-typeck.c (c_finish_omp_clauses): Don't mark
3732 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3733
3e636daf
MP
37342015-11-14 Marek Polacek <polacek@redhat.com>
3735
3736 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3737 * c-typeck.c: Likewise.
3738
ebedc9a3
DM
37392015-11-13 David Malcolm <dmalcolm@redhat.com>
3740
3741 * c-decl.c (warn_defaults_to): Pass line_table to
3742 rich_location ctor.
3743 * c-errors.c (pedwarn_c99): Likewise.
3744 (pedwarn_c90): Likewise.
3745 * c-parser.c (set_c_expr_source_range): New functions.
3746 (c_token::get_range): New method.
3747 (c_token::get_finish): New method.
3748 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3749 based on the range from the start of the LHS to the end of the
3750 RHS.
3751 (c_parser_conditional_expression): Likewise, based on the range
3752 from the start of the cond.value to the end of exp2.value.
3753 (c_parser_binary_expression): Call set_c_expr_source_range on
3754 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3755 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3756 based on the cast_loc through to the end of the expr.
3757 (c_parser_unary_expression): Likewise, based on the
3758 op_loc through to the end of op.
3759 (c_parser_sizeof_expression) Likewise, based on the start of the
3760 sizeof token through to either the closing paren or the end of
3761 expr.
3762 (c_parser_postfix_expression): Likewise, using the token range,
3763 or from the open paren through to the close paren for
3764 parenthesized expressions.
3765 (c_parser_postfix_expression_after_primary): Likewise, for
3766 various kinds of expression.
3767 * c-tree.h (struct c_expr): Add field "src_range".
3768 (c_expr::get_start): New method.
3769 (c_expr::get_finish): New method.
3770 (set_c_expr_source_range): New decls.
3771 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3772 on ret for prefix unary ops.
3773 (parser_build_binary_op): Likewise, running from the start of
3774 arg1.value through to the end of arg2.value.
3775
ec8b536f
MP
37762015-11-13 Marek Polacek <polacek@redhat.com>
3777
3778 PR c/68320
3779 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3780
277fe616
DM
37812015-11-13 David Malcolm <dmalcolm@redhat.com>
3782
3783 * c-typeck.c: Include spellcheck.h.
3784 (lookup_field_fuzzy_find_candidates): New function.
3785 (lookup_field_fuzzy): New function.
3786 (build_component_ref): If the field was not found, try using
3787 lookup_field_fuzzy and potentially offer a suggestion.
3788
6e232ba4
JN
37892015-11-12 James Norris <jnorris@codesourcery.com>
3790 Joseph Myers <joseph@codesourcery.com>
3791
3792 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3793 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3794 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3795 and PRAGMA_OMP_CLAUSE_LINK.
3796 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3797 and PRAGMA_OACC_CLAUSE_LINK.
3798 (OACC_DECLARE_CLAUSE_MASK): New definition.
3799 (c_parser_oacc_declare): New function.
3800
9be4f715
MP
38012015-11-12 Marek Polacek <polacek@redhat.com>
3802
3803 PR c/67784
3804 * c-parser.c (c_parser_for_statement): Reclassify the token in
3805 a correct scope.
3806
e78bede6
MP
38072015-11-11 Marek Polacek <polacek@redhat.com>
3808
3809 PR c/68107
3810 PR c++/68266
3811 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3812 checking the size of an array.
3813
69f293c9
AM
38142015-11-11 Andrew MacLeod <amacleod@redhat.com>
3815
3816 * c-array-notation.c: Remove unused header files.
3817 * c-aux-info.c: Likewise.
3818 * c-convert.c: Likewise.
3819 * c-decl.c: Likewise.
3820 * c-errors.c: Likewise.
3821 * c-lang.c: Likewise.
3822 * c-objc-common.c: Likewise.
3823 * c-parser.c: Likewise.
3824 * c-typeck.c: Likewise.
3825 * gccspec.c: Likewise.
3826
3a40d81d
NS
38272015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3828 Cesar Philippidis <cesar@codesourcery.com>
3829 James Norris <jnorris@codesourcery.com>
3830 Julian Brown <julian@codesourcery.com>
3831 Nathan Sidwell <nathan@codesourcery.com>
3832
3a40d81d
NS
3833 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3834 routine arg.
3835 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3836 (c_parser_pragma): Parse 'acc routine'.
3837 (OACC_ROUTINE_CLAUSE_MARK): Define.
3838 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3839
fc402eec
AA
38402015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3841
3842 PR debug/67192
3843 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3844 location of the backward-goto to the start of the loop body.
3845
f6b0b3db
AA
38462015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3847
3848 PR debug/67192
3849 * c-parser.c (c_parser_while_statement): Finish the loop before
3850 parsing ahead for misleading indentation.
3851 (c_parser_for_statement): Likewise.
3852
ee45a32d
EB
38532015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3854
3855 * c-decl.c (finish_struct): If the structure has reverse storage
3856 order, rewrite the type of array fields with scalar component. Call
3857 maybe_apply_pragma_scalar_storage_order on entry.
3858 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3859 errors on bit-fields and reverse SSO here and not...
3860 (c_mark_addressable): ...here.
3861 (output_init_element): Adjust call to initializer_constant_valid_p.
3862 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3863
8a645150
DM
38642015-11-06 David Malcolm <dmalcolm@redhat.com>
3865
3866 * c-decl.c (warn_defaults_to): Update for change in signature
3867 of diagnostic_set_info.
3868 * c-errors.c (pedwarn_c99): Likewise.
3869 (pedwarn_c90): Likewise.
3870 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3871 for textinfo::set_location.
3872
7a5e4956
CP
38732015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3874 Thomas Schwinge <thomas@codesourcery.com>
3875 James Norris <jnorris@codesourcery.com>
3876
3877 * c-parser.c (c_parser_omp_clause_name): Add support for
3878 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3879 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3880 default(none) in OpenACC.
3881 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3882 arguments.
3883 (c_parser_oacc_clause_tile): New function.
3884 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3885 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3886 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3887 TILE}.
3888 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3889 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3890 FIRSTPRIVATE}.
3891 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3892 (c_parser_oacc_update): Update the error message for missing clauses.
3893 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3894 and OMP_CLAUSE_INDEPENDENT.
3895
bfcfbfa0
MP
38962015-11-05 Marek Polacek <polacek@redhat.com>
3897
3898 PR c/68090
3899 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3900 deal with pre-evaluation on invalid types.
3901
e01d41e5
JJ
39022015-11-05 Jakub Jelinek <jakub@redhat.com>
3903 Ilya Verbin <ilya.verbin@intel.com>
3904
3905 * c-parser.c: Include context.h and gimple-expr.h.
3906 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3907 monotonic together with nonmonotonic.
3908 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3909 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3910 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3911 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3912 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3913 expressions on combined target teams before the target.
3914 (c_parser_omp_declare_target): If decl has "omp declare target" or
3915 "omp declare target link" attribute, and cgraph or varpool node already
3916 exists, then set corresponding flags. Call c_finish_omp_clauses
3917 in the parenthesized extended-list syntax case.
3918 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3919 declare target.
3920 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3921 on OMP_CLAUSE_REDUCTION array sections.
3922 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3923 into the constant offset, or for variable low-bound using
3924 POINTER_PLUS_EXPR. For structure element based array sections use
3925 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3926 (c_finish_omp_clauses): Drop generic_field_head, structure
3927 elements are now always mapped even as array section bases,
3928 diagnose same var in data sharing and mapping clauses. Diagnose if
3929 linear step on declare simd is neither a constant nor a uniform
3930 parameter. Look through POINTER_PLUS_EXPR for array section
3931 reductions. Diagnose the same var or function appearing multiple
3932 times on the same directive. Fix up wording for the to clause if t
3933 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3934 modifier on kinds other than dynamic or guided or nonmonotonic
3935 modifier together with ordered clause.
3936
4bf9e5a8
TS
39372015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3938 Chung-Lin Tang <cltang@codesourcery.com>
3939
3940 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3941
2adfab87
AM
39422015-10-29 Andrew MacLeod <amacleod@redhat.com>
3943
3944 * c-array-notation.c: Reorder #include's and remove duplicates.
3945 * c-aux-info.c: Likewise.
3946 * c-convert.c: Likewise.
3947 * c-decl.c: Likewise.
3948 * c-errors.c: Likewise.
3949 * c-lang.c: Likewise.
3950 * c-objc-common.c: Likewise.
3951 * c-parser.c: Likewise.
3952 * c-typeck.c: Likewise.
3953
e922069e
JW
39542015-10-26 Jim Wilson <jim.wilson@linaro.org>
3955
3956 PR debug/66068
3957 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3958 after calling build_qualified_type.
3959
765dd391
CP
39602015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3961 Thomas Schwinge <thomas@codesourcery.com>
3962 James Norris <jnorris@codesourcery.com>
3963 Joseph Myers <joseph@codesourcery.com>
3964 Julian Brown <julian@codesourcery.com>
3965 Bernd Schmidt <bschmidt@redhat.com>
3966
3967 * c-parser.c (c_parser_oacc_shape_clause): New.
3968 (c_parser_oacc_simple_clause): New.
3969 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3970 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3971
88bae6f4
TS
39722015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3973 James Norris <jnorris@codesourcery.com>
3974 Cesar Philippidis <cesar@codesourcery.com>
3975
3976 PR c/64765
3977 PR c/64880
3978 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3979 parameters, and handle these. Adjust all users.
3980 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3981 into...
3982 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3983 all users.
3984 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3985 declare functions.
3986 (c_finish_omp_construct): Declare function.
3987 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3988 Merge functions into...
3989 (c_finish_omp_construct): ... this new function.
3990
a8fc2579
RB
39912015-10-22 Richard Biener <rguenther@suse.de>
3992
3993 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3994 before folding a MINUS_EXPR.
3995
e9122ef6
MP
39962015-10-21 Marek Polacek <polacek@redhat.com>
3997
3998 PR c/68024
3999 * c-decl.c (start_function): Warn about vararg functions without
4000 a prototype.
4001
9f47c7e5
IE
40022015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4003
4004 * c-typeck.c (build_conditional_expr): Use boolean vector
4005 type for vector comparison.
4006 (build_vec_cmp): New.
4007 (build_binary_op): Use build_vec_cmp for comparison.
4008
fa60eeb9
MP
40092015-10-20 Marek Polacek <polacek@redhat.com>
4010
4011 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4012
2c7020eb
MP
40132015-10-20 Marek Polacek <polacek@redhat.com>
4014
4015 PR c/67964
4016 * c-parser.c (c_parser_attributes): Break out of the loop if the
4017 token after an attribute isn't a comma.
4018
d9a6bd32
JJ
40192015-10-13 Jakub Jelinek <jakub@redhat.com>
4020 Aldy Hernandez <aldyh@redhat.com>
4021
4022 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4023 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4024 (c_parser_omp_variable_list): Handle structure elements for
4025 map, to and from clauses. Handle array sections in reduction
4026 clause. Formatting fixes.
4027 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4028 if clause modifiers.
4029 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4030 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4031 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4032 c_parser_omp_clause_is_device_ptr): New functions.
4033 (c_parser_omp_clause_ordered): Parse optional parameter.
4034 (c_parser_omp_clause_reduction): Handle array reductions.
4035 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4036 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4037 functions.
4038 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4039 (c_parser_omp_clause_depend_sink): New function.
4040 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4041 (c_parser_omp_clause_map): Parse release/delete map kinds and
4042 optional always modifier.
4043 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4044 and c_finish_omp_clauses callers.
4045 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4046 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4047 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4048 (OMP_CRITICAL_CLAUSE_MASK): Define.
4049 (c_parser_omp_critical): Parse critical clauses.
4050 (c_parser_omp_for_loop): Handle doacross loops, adjust
4051 c_finish_omp_for and c_finish_omp_clauses callers.
4052 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4053 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4054 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4055 (c_parser_omp_for): Disallow ordered clause when combined with
4056 distribute. Disallow linear clause when combined with distribute
4057 and not combined with simd.
4058 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4059 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4060 parse clauses and if depend clause is found, don't parse a body.
4061 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4062 Allow target parallel without for after it.
4063 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4064 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4065 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4066 invalid kinds.
4067 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4068 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4069 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4070 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4071 functions.
4072 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4073 defaultmap and is_device_ptr clauses.
4074 (c_parser_omp_target): Parse target parallel and target simd. Set
4075 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4076 and target exit data. Diagnose invalid map kinds.
4077 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4078 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4079 construct.
4080 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4081 &omp_priv.
4082 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4083 (c_parser_omp_taskloop): New function.
4084 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4085 handle PRAGMA_OMP_TASKLOOP.
4086 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4087 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4088 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4089 Add IS_OMP argument, handle structure element bases, diagnose
4090 bitfields, pass IS_OMP recursively, diagnose known zero length
4091 array sections in depend clauses, handle array sections in reduction
4092 clause, diagnose negative length even for pointers.
4093 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4094 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4095 array sections in reduction clause, set
4096 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4097 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4098 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4099 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4100
21ba0cea
MP
41012015-10-06 Marek Polacek <polacek@redhat.com>
4102
4103 * c-parser.c (c_parser_statement_after_labels): Use
4104 protected_set_expr_location.
4105 (c_parser_omp_clause_num_gangs): Likewise.
4106 (c_parser_omp_clause_num_threads): Likewise.
4107 (c_parser_omp_clause_num_workers): Likewise.
4108 (c_parser_omp_clause_vector_length): Likewise.
4109 (c_parser_omp_clause_num_teams): Likewise.
4110 (c_parser_omp_clause_thread_limit): Likewise.
4111 * c-typeck.c (build_c_cast): Likewise.
4112 (c_cast_expr): Likewise.
4113
624d31fe
RS
41142015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4115
4116 * c-typeck.c (c_tree_equal): Use real_equal instead of
4117 REAL_VALUES_EQUAL.
4118
b8fd7909
JM
41192015-10-04 Jason Merrill <jason@redhat.com>
4120
4121 * c-parser.c (c_lex_one_token): Handle @synchronized.
4122 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4123 can change whether the function is transaction_safe.
4124
1c7485af
MP
41252015-10-02 Marek Polacek <polacek@redhat.com>
4126
4127 PR c/67730
4128 * c-typeck.c (convert_for_assignment): Use the expansion point
4129 location throughout.
4130
3e3b8d63
MP
41312015-10-02 Marek Polacek <polacek@redhat.com>
4132
4133 PR c/64249
4134 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4135 and pass it down to c_parser_if_statement.
4136 (c_parser_else_body): Add CHAIN parameter and pass it down to
4137 c_parser_statement_after_labels.
4138 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4139 duplicated if-else-if conditions.
4140
aabef2de
MP
41412015-10-01 Marek Polacek <polacek@redhat.com>
4142
4143 * c-typeck.c (convert_for_assignment): Improve commentary.
4144
de8ddd5f
MP
41452015-09-30 Marek Polacek <polacek@redhat.com>
4146
4147 PR c/67730
4148 * c-typeck.c (c_finish_return): Use the expansion point location for
4149 certain "return with value" warnings.
4150
c4914de6
MLI
41512015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4152
4153 * c-parser.c (pragma_lex): Add loc argument.
4154
0e36f5c7
MP
41552015-09-15 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/67580
4158 * c-decl.c (tag_exists_p): New function.
4159 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4160 struct/union/enum keywords are missing.
4161 * c-tree.h (tag_exists_p): Declare.
4162
2f3bb934
MP
41632015-09-15 Marek Polacek <polacek@redhat.com>
4164
4165 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4166 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4167 Return NULL_TREE instead of 0.
4168 (lookup_name): Return NULL_TREE instead of 0.
4169 (lookup_name_in_scope): Likewise.
4170 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4171 (parser_xref_tag): Use false instead of 0.
4172 (start_struct): Use true instead of 1.
4173 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4174
aa256c4a
MP
41752015-09-14 Marek Polacek <polacek@redhat.com>
4176
4177 * c-typeck.c (set_nonincremental_init_from_string): Use
4178 HOST_WIDE_INT_M1U when shifting a negative value.
4179
dbb68221
MW
41802015-09-09 Mark Wielaard <mjw@redhat.com>
4181
4182 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4183 parm against NULL.
4184
a8a098ac
JJ
41852015-09-10 Jakub Jelinek <jakub@redhat.com>
4186
4187 PR c/67502
4188 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4189 into OMP_FOR_PRE_BODY rather than before the loop.
4190
f4b189d5
JJ
41912015-09-09 Jakub Jelinek <jakub@redhat.com>
4192
0bb99c11
JJ
4193 PR c/67501
4194 * c-parser.c (c_parser_oacc_all_clauses,
4195 c_parser_omp_all_clauses): Remove invalid clause from
4196 list of clauses even if parser->error is set.
4197
fce5e5e3
JJ
4198 PR c/67500
4199 * c-parser.c (c_parser_omp_clause_aligned,
4200 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4201 test for errors.
4202 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4203 error_mark_node.
4204
f4b189d5
JJ
4205 PR c/67495
4206 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4207 instead of c_parser_unary_expression. If the result is !lvalue_p,
4208 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4209
b2aaf235
MP
42102015-09-04 Marek Polacek <polacek@redhat.com>
4211
4212 PR sanitizer/67279
4213 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4214
1807ffc1
MS
42152015-09-03 Martin Sebor <msebor@redhat.com>
4216
4217 PR c/66516
8b652e65
JJ
4218 * c-typeck.c (convert_arguments, parser_build_unary_op,
4219 build_conditional_expr, c_cast_expr, convert_for_assignment,
4220 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4221 reject_gcc_builtin.
4222 (c_decl_implicit): Define.
4223
d04ff417
MP
42242015-09-02 Marek Polacek <polacek@redhat.com>
4225
4226 PR c/67432
4227 * c-parser.c (c_parser_enum_specifier): Give a better error for
4228 an empty enum.
4229
a79683d5
TS
42302015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4231
4232 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4233
191a6b94
MP
42342015-08-12 Marek Polacek <polacek@redhat.com>
4235
4236 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4237 LOC to it.
4238
420a9d9b
MP
42392015-08-03 Marek Polacek <polacek@redhat.com>
4240
4241 PR c/67088
4242 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4243 Use it.
4244 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4245
992118a1
PP
42462015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4247
4248 * c-parser.c (c_parser_if_body): Take token_indent_info
4249 argument. Call warn_for_misleading_indentation even when the
4250 body is a semicolon. Extract token_indent_infos corresponding
4251 to the guard, body and next tokens. Adjust call to
4252 warn_for_misleading_indentation accordingly.
4253 (c_parser_else_body): Likewise.
4254 (c_parser_if_statement): Likewise.
4255 (c_parser_while_statement): Likewise.
4256 (c_parser_for_statement): Likewise.
4257
46308474
LFSM
42582015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4259 Manuel López-Ibáñez <manu@gcc.gnu.org>
4260
4261 * c-decl.c (get_parm_info): Remove static var. Update warning
4262 message.
4263
05b28fd6
MP
42642015-07-27 Marek Polacek <polacek@redhat.com>
4265
4266 PR c++/66555
4267 PR c/54979
4268 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4269
451b5e48
MP
42702015-07-20 Marek Polacek <polacek@redhat.com>
4271
4272 PR c++/55095
4273 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4274 (build_binary_op): Warn about left shift overflows.
4275
1916bcb5
AM
42762015-07-09 Andrew MacLeod <amacleod@redhat.com>
4277
4278 * c-array-notation.c: Adjust includes for flags.h changes.
4279 * c-objc-common.c: Likewise.
4280
c7131fb2
AM
42812015-07-07 Andrew MacLeod <amacleod@redhat.com>
4282
4283 * c-array-notation.c: Adjust includes.
4284 * c-aux-info.c: Likewise.
4285 * c-convert.c: Likewise.
4286 * c-decl.c: Likewise.
4287 * c-errors.c: Likewise.
4288 * c-lang.c: Likewise.
4289 * c-objc-common.c: Likewise.
4290 * c-parser.c: Likewise.
4291 * c-typeck.c: Likewise.
4292
da2e71c9
MLI
42932015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4294
4295 PR fortran/66605
4296 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4297
b155cfd9
MP
42982015-06-29 Marek Polacek <polacek@redhat.com>
4299
4300 PR c/66322
4301 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4302 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4303 about -Wswitch-bool here.
4304 (do_case): Update c_add_case_label call.
4305 (c_finish_case): Update c_do_switch_warnings call.
4306
31521951
MP
43072015-06-27 Marek Polacek <polacek@redhat.com>
4308
4309 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4310
22d03525
MP
43112015-06-26 Marek Polacek <polacek@redhat.com>
4312
4313 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4314 INDIRECT_REF_P.
4315 * c-typeck.c (array_to_pointer_conversion): Likewise.
4316 (build_unary_op): Likewise.
4317 (c_finish_return): Likewise.
4318
f0889939
AM
43192015-06-25 Andrew MacLeod <amacleod@redhat.com>
4320
4321 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4322 * c-parser.c: Likewise.
4323
8d67ee55
RS
43242015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4325
4326 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4327 instead of pointer_hash.
4328 (detect_field_duplicates): Likewise.
4329
0ae9bd27
MP
43302015-06-25 Marek Polacek <polacek@redhat.com>
4331
4332 * c-array-notation.c: Use VAR_P throughout.
4333 * c-decl.c: Likewise.
4334 * c-objc-common.c: Likewise.
4335 * c-parser.c: Likewise.
4336 * c-typeck.c: Likewise.
4337
62f9079a
MP
43382015-06-25 Marek Polacek <polacek@redhat.com>
4339
4340 * c-decl.c: Use is_global_var throughout.
4341 * c-parser.c: Likewise.
4342 * c-typeck.c: Likewise.
4343
abb226c9
AM
43442015-06-17 Andrew MacLeod <amacleod@redhat.com>
4345
4346 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4347 * c-aux-info.c: Likewise.
4348 * c-convert.c: Likewise.
4349 * c-decl.c: Likewise.
4350 * c-errors.c: Likewise.
4351 * c-lang.c: Likewise.
4352 * c-objc-common.c: Likewise.
4353 * c-parser.c: Likewise.
4354 * c-typeck.c: Likewise.
4355
8cbababc
JH
43562015-06-11 Jan Hubicka <hubicka@ucw.cz>
4357
4358 PR middle-end/66325
4359 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4360 variants.
4361
a0349665
PMR
43622015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4363
4364 * c-decl.c (pop_scope): Register the main translation unit
4365 through the new debug hook.
4366
13fdf2e2
AM
43672015-06-08 Andrew MacLeod <amacleod@redhat.com>
4368
4369 * c-array-notation.c : Adjust include files.
4370 * c-aux-info.c : Likewise.
4371 * c-convert.c : Likewise.
4372 * c-decl.c : Likewise.
4373 * c-errors.c : Likewise.
4374 * c-lang.c : Likewise.
4375 * c-lang.h : Likewise.
4376 * c-objc-common.c : Likewise.
4377 * c-parser.c : Likewise.
4378 * c-typeck.c : Likewise.
4379
d7438551
AH
43802015-06-05 Aldy Hernandez <aldyh@redhat.com>
4381
4382 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4383 immediately clobber it.
4384 (c_write_global_declarations_1): Remove call to
4385 check_global_declaration_1.
4386 (c_write_global_declarations_2): Remove.
4387 (c_write_final_cleanups): Rename from c_write_global_declarations.
4388 Remove call to finalize_compilation_unit.
4389 Remove calls to debugging hooks.
4390 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4391 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4392 * c-tree.h: Remove c_write_global_declarations.
4393
ecb9f223
AM
43942015-06-04 Andrew MacLeod <amacleod@redhat.com>
4395
4396 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4397 * c-aux-info.c: Likewise.
4398 * c-convert.c: Likewise.
4399 * c-decl.c: Likewise.
4400 * c-errors.c: Likewise.
4401 * c-lang.c: Likewise.
4402 * c-objc-common.c: Likewise.
4403 * c-parser.c: Likewise.
4404 * c-typeck.c: Likewise.
4405
9482b620
MP
44062015-06-04 Marek Polacek <polacek@redhat.com>
4407
4408 PR c/66341
4409 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4410 it is a lvalue.
4411
bc51ace3
PK
44122015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4413
4414 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4415 Warn for empty struct.
4416 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4417
ea5b45b6
AT
44182015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4419
4420 * c-decl.c (start_function): Call plugin before parsing.
4421 (finish_function): Call plugin after parsing.
4422
c2d47482
PK
44232015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4424
4425 PR c/49551
4426 * c-decl.c (merge_decls): Merge DECL_COMMON.
4427
a95492ab
JW
44282015-05-22 Jim Wilson <jim.wilson@linaro.org>
4429
4430 * Make-lang.in (check_gcc_pallelize): Define.
4431
fd5c817a
MP
44322015-05-22 Marek Polacek <polacek@redhat.com>
4433
4434 PR c/47043
4435 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4436 attributes.
4437
c7b70a3c
MP
44382015-05-21 Marek Polacek <polacek@redhat.com>
4439
4440 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4441 DECL_BUILT_IN.
4442
21b634ae
MP
44432015-05-20 Marek Polacek <polacek@redhat.com>
4444
4445 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4446 * c-typeck.c: Likewise.
4447
296a8c2f
MP
44482015-05-19 Marek Polacek <polacek@redhat.com>
4449
4450 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4451
41b37d5e
JJ
44522015-05-19 Jakub Jelinek <jakub@redhat.com>
4453
4454 PR middle-end/66199
4455 * c-parser.c (c_parser_omp_for_loop): Don't add
4456 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4457 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4458 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4459 constructs.
4460
fab27f52
MM
44612015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4462
4463 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4464 swaps.
fab27f52 4465
40de31cf
MLI
44662015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4467
4468 PR fortran/44054
4469 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4470 accessor function.
4471
3aa3c9fc
MP
44722015-05-14 Marek Polacek <polacek@redhat.com>
4473
4474 PR c/66066
4475 PR c/66127
4476 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4477 rather than with 0.
4478
c3388e62
DM
44792015-05-12 David Malcolm <dmalcolm@redhat.com>
4480
4481 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4482 to add a call to warn_for_misleading_indentation.
4483 (c_parser_else_body): Likewise, adding param "else_loc".
4484 (c_parser_if_statement): Check for misleading indentation.
4485 (c_parser_while_statement): Likewise.
4486 (c_parser_for_statement): Likewise.
4487
755e528f
MP
44882015-05-08 Marek Polacek <polacek@redhat.com>
4489
4490 PR c/64918
4491 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4492 (output_init_element): Likewise.
4493
0173bd2a
MP
44942015-05-07 Marek Polacek <polacek@redhat.com>
4495
4496 PR c/65179
4497 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4498 value.
4499
9babc352
MP
45002015-04-30 Marek Polacek <polacek@redhat.com>
4501
4502 * c-typeck.c (set_init_label): Call error_at instead of error and
4503 pass LOC to it.
4504
ac9f18db
MP
4505 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4506 the type of a decl.
4507
ec3fba51
MP
4508 * c-typeck.c (c_build_va_arg): Clarify the error message.
4509
b811915d
TS
45102015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4511
4512 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4513 OMP_STANDALONE_CLAUSES.
4514
f3075008
MP
45152015-04-28 Marek Polacek <polacek@redhat.com>
4516
4517 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4518
4e81b788
MP
45192015-04-28 Marek Polacek <polacek@redhat.com>
4520
4521 PR c/65901
4522 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4523
6c1db78e
MP
45242015-04-25 Marek Polacek <polacek@redhat.com>
4525
4526 PR c/52085
4527 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4528 attribute.
4529
5c4abbb8
MP
45302015-04-23 Marek Polacek <polacek@redhat.com>
4531
4532 PR c/65345
4533 * c-decl.c (set_labels_context_r): New function.
4534 (store_parm_decls): Call it via walk_tree_without_duplicates.
4535 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4536 instead of create_tmp_var. Build TARGET_EXPR instead of
4537 COMPOUND_EXPR.
4538 (build_atomic_assign): Use create_tmp_var_raw instead of
4539 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4540
06aca1d5
IV
45412015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4542
4543 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4544 (c_parser_omp_target_update): Add missed %> to error_at ().
4545
8fba1830
BRF
45462015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4547
4548 PR target/55143
4549 * c-decl.c (c_default_pointer_mode): Remove definition.
4550 * c-tree.h (c_default_pointer_mode): Remove declaration.
4551
62021f64
TB
45522015-03-27 Tobias Burnus <burnus@net-b.de>
4553
4554 PR c/65586
4555 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4556 error out.
4557 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4558 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4559 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4560
9b65e171
JJ
45612015-03-19 Jakub Jelinek <jakub@redhat.com>
4562
4563 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4564 attribute for DECL_EXTERNAL VAR_DECLs.
4565
17958621
JJ
45662015-03-11 Jakub Jelinek <jakub@redhat.com>
4567
4568 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4569 argument.
4570
7ccb1a11
JJ
45712015-03-10 Jakub Jelinek <jakub@redhat.com>
4572
4573 PR c/65120
4574 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4575 before preparing arguments to warn_logical_not_parentheses.
4576
01177669
JJ
45772015-03-09 Jakub Jelinek <jakub@redhat.com>
4578
4579 PR c/65120
4580 * c-typeck.c (parser_build_binary_op): Don't warn for
4581 !!x == y or !b == y where b is _Bool.
4582
802ac282
MP
45832015-03-09 Marek Polacek <polacek@redhat.com>
4584
4585 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4586 * c-decl.c (grokdeclarator): Likewise.
4587 * c-typeck.c (build_binary_op): Likewise.
4588
e5165b60
MP
45892015-02-27 Marek Polacek <polacek@redhat.com>
4590
4591 PR c/65228
4592 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4593
065d214c
MP
45942015-02-14 Marek Polacek <polacek@redhat.com>
4595
4596 PR c/64768
4597 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4598 declared through a typedef name.
4599
e5d9235b
MP
46002015-02-13 Marek Polacek <polacek@redhat.com>
4601
4602 PR c/65050
4603 * c-decl.c (grokdeclarator): Print also the type when giving
4604 the error message about array's incomplete element type.
4605
fa01ffcc
JJ
46062015-02-11 Jakub Jelinek <jakub@redhat.com>
4607
4608 PR c/64824
4609 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4610 check in the POP macro.
4611
c3e38a03
MP
46122015-02-09 Marek Polacek <polacek@redhat.com>
4613
4614 PR c/64856
4615 * c-typeck.c (process_init_element): Don't always wrap
4616 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4617 initializing a range of elements.
4618
4886ec8e
JJ
46192015-02-04 Jakub Jelinek <jakub@redhat.com>
4620
4621 PR c/64824
4622 PR c/64868
4623 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4624
c3e38a03 46252015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4626
4627 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4628 processing enum declaration.
4629
7b33f0c8
MP
46302015-01-29 Marek Polacek <polacek@redhat.com>
4631
4632 PR c/64709
4633 * c-typeck.c (pop_init_level): If constructor_elements has
4634 exactly one element with integer_zerop value, set constructor_zeroinit
4635 to 1. Remove braces around warning_init call.
4636
dea63e49
JJ
46372015-01-27 Jakub Jelinek <jakub@redhat.com>
4638
4639 PR c/64766
4640 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4641 of FUNCTION_DECLs with error_mark_node.
4642
d38f7dce
JJ
46432015-01-26 Jakub Jelinek <jakub@redhat.com>
4644
4645 PR c/64778
4646 * c-typeck.c (convert_arguments): Return -1 if there are
4647 error_args, even if we've diagnosed too many arguments.
4648
cbf5d0e7
RB
46492015-01-21 Richard Biener <rguenther@suse.de>
4650
4651 PR middle-end/64313
4652 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4653 for builtins the user declared correctly.
4654
41dbbb37
TS
46552015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4656 Bernd Schmidt <bernds@codesourcery.com>
4657 Cesar Philippidis <cesar@codesourcery.com>
4658 James Norris <jnorris@codesourcery.com>
4659 Jakub Jelinek <jakub@redhat.com>
4660 Ilmir Usmanov <i.usmanov@samsung.com>
4661
4662 * c-parser.c: Include "gomp-constants.h".
4663 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4664 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4665 Use OMP_CLAUSE_SET_MAP_KIND.
4666 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4667 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4668 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4669 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4670 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4671 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4672 "copyout", "create", "delete", "deviceptr", "gang", "host",
4673 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4674 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4675 "present_or_create", "pcreate", "seq", "self", "vector",
4676 "vector_length", "wait", "worker".
4677 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4678 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4679 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4680 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4681 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4682 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4683 (c_parser_oacc_data_clause_deviceptr)
4684 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4685 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4686 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4687 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4688 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4689 (c_parser_oacc_parallel, c_parser_oacc_update)
4690 (c_parser_oacc_wait): New functions.
4691 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4692 (c_finish_oacc_data): New prototypes.
4693 * c-typeck.c: Include "gomp-constants.h".
4694 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4695 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4696 OMP_CLAUSE_SET_MAP_KIND.
4697 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4698 (c_finish_oacc_data): New functions.
4699 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4700 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4701 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4702 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4703 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4704 GOMP_MAP_FORCE_DEVICEPTR.
4705
adfac8df
JJ
47062015-01-09 Michael Collison <michael.collison@linaro.org>
4707
4708 * c-array-notation.c: Include hash-set.h, machmode.h,
4709 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4710 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4711 * c-aux-info.c: Ditto.
4712 * c-convert.c: Ditto.
4713 * c-decl.c: Ditto.
4714 * c-errors.c: Ditto.
4715 * c-lang.c: Dittoxs.
4716 * c-objc-common.c: Ditto.
4717 * c-parser.c: Ditto.
4718 * c-typeck.c: Include hash-set.h, machmode.h,
4719 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4720 fold-const.h, wide-int.h, inchash.h, real.h and
4721 fixed-value.h due to flattening of tree.h.
4722
2cc901dc
MP
47232015-01-07 Marek Polacek <polacek@redhat.com>
4724
4725 PR c/64417
4726 * c-typeck.c (process_init_element): Disallow initialization of
4727 a flexible array member with a string constant if the structure
4728 is in an array.
4729
5624e564
JJ
47302015-01-05 Jakub Jelinek <jakub@redhat.com>
4731
e5341100
JJ
4732 PR sanitizer/64344
4733 * c-typeck.c (convert_for_assignment, c_finish_return): For
4734 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4735 types also set in_late_binary_op around convert call.
4736 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4737 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4738 result on expr as last argument to ubsan_instrument_float_cast,
4739 if in_late_binary_op, don't use c_save_expr but save_expr.
4740
5624e564
JJ
4741 Update copyright years.
4742
5bd012f8
MP
47432015-01-05 Marek Polacek <polacek@redhat.com>
4744
4745 PR c/64423
4746 * c-typeck.c (build_array_ref): Pass loc down to
4747 warn_array_subscript_with_type_char.
4748
3f8257db 47492014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4750
4751 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4752 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4753 element type.
8e745a17 4754 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4755 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4756 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4757 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4758 to PEDWARN_FOR_QUALIFIERS.
768952be 4759
8f94a8c4
JJ
47602014-12-17 Jakub Jelinek <jakub@redhat.com>
4761
4762 PR sanitizer/64289
4763 * c-convert.c: Include ubsan.h.
4764 (convert): For real -> integral casts and
4765 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4766 instead instrument the float cast directly.
4767
b731b390
JJ
47682014-11-29 Jakub Jelinek <jakub@redhat.com>
4769
4770 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4771 c_finish_stmt_expr): Remove NULL last argument from
4772 create_tmp_var_raw and create_tmp_var calls.
4773 * c-array-notation.c (fix_builtin_array_notation_fn,
4774 build_array_notation_expr, fix_conditional_array_notations_1,
4775 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4776
541e35a6
MP
47772014-11-28 Marek Polacek <polacek@redhat.com>
4778
4779 PR c/63862
4780 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4781 convert the right operand to integer type.
4782
b286be94
MP
47832014-11-25 Marek Polacek <polacek@redhat.com>
4784
4785 PR c/63877
4786 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4787 for inline functions.
4788
aa7da51a
JJ
47892014-11-21 Jakub Jelinek <jakub@redhat.com>
4790
4791 PR target/63764
4792 * c-typeck.c (build_array_ref): Adjust
4793 convert_vector_to_pointer_for_subscript caller. If it returns true,
4794 call non_lvalue_loc on the result.
4795
d876207f
RB
47962014-11-11 Richard Biener <rguenther@suse.de>
4797
4798 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4799 to true.
4800
e5e44252
AK
48012014-11-10 Andi Kleen <ak@linux.intel.com>
4802
4803 PR c/60804
4804 * c-parser.c (c_parser_statement_after_labels): Call
4805 check_no_cilk.
4806 (c_parser_if_statement): Dito.
4807 (c_parser_switch_statement): Dito.
4808 (c_parser_while_statement): Dito.
4809 (c_parser_do_statement): Dito.
4810 (c_parser_for_statement): Dito.
4811 * c-typeck.c (c_finish_loop): Dito.
4812
13c21655
PC
48132014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4814
4815 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4816 OPT_Wshift_count_overflow in the warnings.
4817
2d51fcef
MP
48182014-10-30 Marek Polacek <polacek@redhat.com>
4819
4820 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4821 print the stripped version as well, if they're not the same.
4822
ef4bddc2
RS
48232014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4824
4825 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4826 machine_mode.
4827
c582198b
AM
48282014-10-28 Andrew MacLeod <amacleod@redhat.com>
4829
4830 * c-decl.c: Adjust include files.
4831 * c-parser.c: Ditto.
4832
ddc8de03
PM
48332014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4834 Tom Tromey <tromey@redhat.com>
4835
4836 * c-tree.h (enum c_oracle_request): New.
4837 (c_binding_oracle_function): New typedef.
4838 (c_binding_oracle, c_pushtag, c_bind): Declare.
4839 * c-decl.c (c_binding_oracle): New global.
4840 (I_SYMBOL_CHECKED): New macro.
4841 (i_symbol_binding): New function.
4842 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4843 (I_TAG_CHECKED): New macro.
4844 (i_tag_binding): New function.
4845 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4846 (I_LABEL_CHECKED): New macro.
4847 (i_label_binding): New function.
4848 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4849 (c_print_identifier): Save and restore c_binding_oracle.
4850 (c_pushtag, c_bind): New functions.
4851
60393bbc
AM
48522014-10-27 Andrew MacLeod <amacleod@redhat.com>
4853
4854 * c-typeck.c: Adjust include files.
4855
d723bb7c
MLI
48562014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4857
4858 PR c++/53061
4859 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4860 initialization here...
4861 (c_initialize_diagnostics): ... but here. Set defaults after
4862 building pretty-printer.
4863
1bc5a451
MP
48642014-10-23 Marek Polacek <polacek@redhat.com>
4865
4866 PR c/63626
4867 * c-decl.c (pop_scope): Don't print warning in external_scope.
4868
4435bb92
MP
48692014-10-19 Marek Polacek <polacek@redhat.com>
4870
4871 PR c/63567
4872 * c-typeck.c (output_init_element): Allow initializing objects with
4873 static storage duration with compound literals even in C99 and add
4874 pedwarn for it.
4875
7278465e
MP
48762014-10-17 Marek Polacek <polacek@redhat.com>
4877
4878 PR c/63567
4879 * c-typeck.c (digest_init): Allow initializing objects with static
4880 storage duration with compound literals even in C99 and add pedwarn
4881 for it.
4882
d9b7be2e
MP
48832014-10-17 Marek Polacek <polacek@redhat.com>
4884
4885 PR c/63543
4886 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4887 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4888 error multiple times. Print the type.
4889
f406ae1f
MP
48902014-10-17 Marek Polacek <polacek@redhat.com>
4891
4892 PR c/63549
4893 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4894 type.
4895
92574c7c
MP
48962014-10-17 Marek Polacek <polacek@redhat.com>
4897
4898 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4899 (start_function): Use OPT_Wimplicit_int instead of 0.
4900 (store_parm_decls_oldstyle): Likewise.
4901
1bc4a978
MT
49022014-10-17 Alan Modra <amodra@gmail.com>
4903
4904 PR middle-end/61848
4905 * c-decl.c (merge_decls): Don't merge section name or tls model
4906 to newdecl symtab node, instead merge to olddecl. Override
4907 existing olddecl section name. Set tls_model for all thread-local
4908 vars, not just OMP thread-private ones. Remove incorrect comment.
4909
83685514
AM
49102014-10-16 Andrew MacLeod <amacleod@redhat.com>
4911
4912 * c-decl.c: Adjust include files.
4913
78a7c317
DD
49142014-10-14 DJ Delorie <dj@redhat.com>
4915
4916 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4917 (c_token_starts_typename): Check all __intN, not just __int128.
4918 (c_token_starts_declspecs): Likewise.
4919 (c_parser_declspecs): Likewise.
4920 (c_parser_attribute_any_word): Likewise.
4921 (c_parser_objc_selector): Likewise.
4922 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4923 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4924 is specified.
4925 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4926 __int128.
4927 (finish_declspecs): Likewise.
4928
74d98c1e
AB
49292014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4930
8e745a17 4931 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4932 the duplicate code.
8e745a17 4933 (c_parser_statement): Call the new function.
74d98c1e 4934
84937de2
MP
49352014-10-09 Marek Polacek <polacek@redhat.com>
4936
4937 PR c/63480
4938 * c-typeck.c (pop_init_level): Don't warn about initializing
4939 with { }.
4940
0382aaa0
MP
49412014-10-07 Marek Polacek <polacek@redhat.com>
4942
4943 PR c/59717
4944 * c-decl.c (header_for_builtin_fn): New function.
4945 (implicitly_declare): Suggest which header to include.
4946
7a0ca710
MP
49472014-10-07 Marek Polacek <polacek@redhat.com>
4948
4949 * c-convert.c (convert): Use error_operand_p.
4950 * c-typeck.c (require_complete_type): Likewise.
4951 (really_atomic_lvalue): Likewise.
4952 (digest_init): Likewise.
4953 (handle_omp_array_sections_1): Likewise.
4954
6bc8a126
MP
49552014-10-03 Marek Polacek <polacek@redhat.com>
4956
4957 PR c/63453
4958 * c-decl.c (pop_scope): Don't warn about "inline function declared
4959 but never defined" for functions marked with gnu_inline attribute.
4960
d90c0a59
JJ
49612014-09-25 Jakub Jelinek <jakub@redhat.com>
4962
4963 PR c++/63249
4964 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4965 on low_bound and length.
4966
083e891e
MP
49672014-09-24 Marek Polacek <polacek@redhat.com>
4968
4969 PR c/61405
4970 PR c/53874
4971 * c-parser.c: Don't define CPP_KEYWORD.
4972 (c_parser_switch_statement): Pass original type to c_finish_case.
4973 * c-tree.h (c_finish_case): Update declaration.
4974 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4975 conditionally to c_do_switch_warnings.
4976
8d95fe25
MP
49772014-09-03 Marek Polacek <polacek@redhat.com>
4978
4979 PR c/62024
4980 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4981 conversions.
4982
9a771876
JJ
49832014-09-02 Jakub Jelinek <jakub@redhat.com>
4984 Balaji V. Iyer <balaji.v.iyer@intel.com>
4985 Igor Zamyatin <igor.zamyatin@intel.com>
4986
4987 * c-parser.c (c_parser_cilk_for): New function.
4988 (c_parser_cilk_grainsize): Likewise.
4989 (c_get_temp_regvar): Likewise.
4990 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4991 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4992 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4993 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4994 case.
4995
b7679d96
CG
49962014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4997
4998 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4999 with using HOST_WIDE_INT without truncation to 'int'
5000
59ea0364
MP
50012014-08-22 Marek Polacek <polacek@redhat.com>
5002
5003 PR c++/62199
5004 * c-typeck.c (parser_build_binary_op): Adjust call to
5005 warn_logical_not_parentheses.
5006
671a475e
IZ
50072014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5008
5009 PR other/62008
5010 * c-parser.c (c_parser_array_notation): Check for correct
5011 type of an array added.
5012
04159acf
MP
50132014-08-19 Marek Polacek <polacek@redhat.com>
5014
5015 PR c++/62153
5016 * c-typeck.c (build_binary_op): If either operand of a comparison
5017 is a boolean expression, call maybe_warn_bool_compare.
5018
c77935ee
PP
50192014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5020
5021 PR c/45584
5022 * c-typeck.c (build_c_cast): Do a conversion even when the
5023 TYPE_MAIN_VARIANTs are the same.
5024
35aff4fb
MP
50252014-08-19 Marek Polacek <polacek@redhat.com>
5026
5027 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5028 pedwarn_c99 instead of pedwarn.
5029 (grokfield): Likewise.
5030 (warn_defaults_to): New function.
5031 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5032 Unconditionally call pedwarn_c99 instead of pedwarn.
5033 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5034 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5035 check flag_isoc11 before.
5036 * c-errors.c (pedwarn_c99): Change the return type to bool.
5037 Handle -Wc99-c11-compat.
5038 * c-parser.c (disable_extension_diagnostics): Handle
5039 warn_c99_c11_compat.
5040 (restore_extension_diagnostics): Likewise.
5041 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5042 instead of pedwarn, don't check flag_isoc11 before.
5043 (c_parser_declspecs): Likewise.
5044 (c_parser_alignas_specifier): Likewise.
5045 (c_parser_alignof_expression): Likewise.
5046 (c_parser_generic_selection): Likewise.
5047 * c-tree.h (pedwarn_c99): Update declaration.
5048 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5049 of pedwarn_c99.
5050
177cce46
MP
50512014-08-19 Marek Polacek <polacek@redhat.com>
5052
5053 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5054 to pedwarn_c90.
5055 * c-errors.c: Include "opts.h".
5056 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5057 * c-parser.c (disable_extension_diagnostics): Handle negative value
5058 of warn_c90_c99_compat, too.
5059 (restore_extension_diagnostics): Likewise.
5060 (c_parser_compound_statement_nostart): Pass
5061 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5062
6dc99c33
MP
50632014-08-12 Marek Polacek <polacek@redhat.com>
5064
5065 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5066 Add pedwarn.
5067 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5068 Likewise.
5069 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5070
3f8257db 50712014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5072
5073 PR c/51849
5074 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5075 Call pedwarn_c90 instead of pedwarn.
5076 (check_bitfield_type_and_width): Likewise.
5077 (declspecs_add_qual): Likewise.
5078 (declspecs_add_type): Likewise.
5079 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5080 Adjust to only call pedwarn_c90.
5081 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5082 pedwarn_c90 instead of pedwarn.
5083 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5084 * c-parser.c (disable_extension_diagnostics): Handle
5085 warn_c90_c99_compat.
5086 (restore_extension_diagnostics): Likewise.
5087 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5088 pedwarn_c90 instead of pedwarn.
5089 (c_parser_initelt): Likewise.
5090 (c_parser_postfix_expression): Likewise.
5091 (c_parser_postfix_expression_after_paren_type): Likewise.
5092 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5093 * c-tree.h: Fix formatting.
5094 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5095 pedwarn_c90 instead of pedwarn.
5096
9f25a338
TS
50972014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5098
5099 * c-typeck.c: Remove include of pointer-set.h.
5100
044331a8
MP
51012014-08-07 Marek Polacek <polacek@redhat.com>
5102
5103 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5104
b787e7a2
TS
51052014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5106
5107 * c-typeck.c: Use hash_map instead of pointer_map.
5108
6e2830c3
TS
51092014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5110
5111 * c-decl.c: Use hash_set instead of pointer_set.
5112
a7ee52fb
IZ
51132014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5114
5115 PR middle-end/61455
5116 * c-array-notation.c (expand_array_notations): Handling
5117 of DECL_EXPR added.
5118
b4dfdc11
MG
51192014-07-31 Marc Glisse <marc.glisse@inria.fr>
5120
5121 PR c++/60517
5122 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5123 a local variable.
5124
976d5a22
TT
51252014-07-30 Tom Tromey <tromey@redhat.com>
5126
5127 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5128 field.
5129 (really_start_incremental_init, push_init_level): Initialize
5130 designator_depth.
5131 (pop_init_level): Set global designator_depth.
5132 (process_init_element): Check for designated_init attribute.
5133
30281de2
MP
51342014-07-20 Marek Polacek <polacek@redhat.com>
5135
5136 PR c/61852
5137 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5138 (implicitly_declare): Pass location to implicit_decl_warning.
5139
b108f48f
JJ
51402014-07-14 Jakub Jelinek <jakub@redhat.com>
5141
5142 PR middle-end/61294
5143 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5144 If non-NULL, call c_parser_check_literal_zero.
5145 (c_parser_check_literal_zero): New function.
5146 (c_parser_postfix_expression_after_primary): Adjust
5147 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5148
773ec47f
MP
51492014-07-06 Marek Polacek <polacek@redhat.com>
5150
5151 PR c/6940
5152 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5153 * c-tree.h (C_ARRAY_PARAMETER): Define.
5154 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5155 function parameter.
5156
22e1cf1c 51572014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5158 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5159
5160 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5161 releasing symbol.
5162
52ec0ea3
MP
51632014-07-01 Marek Polacek <polacek@redhat.com>
5164
5165 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5166 instead of 0 to WARN_FOR_ASSIGNMENT.
5167
d5c3d343
MP
51682014-07-01 Marek Polacek <polacek@redhat.com>
5169
5170 PR c/58286
5171 * c-typeck.c (convert_for_assignment): Pass
5172 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5173
6a7253a4
MP
51742014-06-30 Marek Polacek <polacek@redhat.com>
5175
5176 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5177 has no_sanitize_undefined attribute.
5178
5e88a8f4
IZ
51792014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5180
5181 PR middle-end/57541
5182 * c-array-notation.c (fix_builtin_array_notation_fn):
5183 Check for 0 arguments in builtin call. Check that bultin argument is
5184 correct.
5185 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5186 index.
5187
9698b078
SH
51882014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5189
5190 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5191 qualifiers in __auto_type for atomic types.
5192 (c_parser_typeof_specifier): Discard all type qualifiers in
5193 __typeof__ for atomic types.
5194
6e07c515
MP
51952014-06-25 Marek Polacek <polacek@redhat.com>
5196
5197 PR c/61162
5198 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5199 the return expression to c_finish_return.
5200
da6f124d
JJ
52012014-06-25 Jakub Jelinek <jakub@redhat.com>
5202
5203 * c-typeck.c (c_finish_omp_clauses): Make sure
5204 OMP_CLAUSE_LINEAR_STEP has correct type.
5205
c203e8a7
TS
52062014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5207
5208 * c-decl.c: Adjust.
5209
56ad0e38
JJ
52102014-06-24 Jakub Jelinek <jakub@redhat.com>
5211
5212 * c-parser.c (c_parser_omp_for_loop): For
5213 #pragma omp parallel for simd move lastprivate clause from parallel
5214 to for rather than simd.
5215
47c2554f
MP
52162014-06-23 Marek Polacek <polacek@redhat.com>
5217
5218 * c-typeck.c (parser_build_binary_op): Don't call
5219 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5220
56363ffd
JH
52212014-06-15 Jan Hubicka <hubicka@ucw.cz>
5222
5223 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5224 * c-decl.c (merge_decls): Likewise.
5225
d7ff7ae5
MP
52262014-06-09 Marek Polacek <polacek@redhat.com>
5227
5228 PR c/36446
5229 * c-typeck.c (error_init): Call inform instead of error_at.
5230 (pedwarn_init): Call inform instead of pedwarn.
5231 (warning_init): Call inform instead of warning_at.
5232
24d047a3
JH
52332014-06-07 Jan Hubicka <hubicka@ucw.cz>
5234
5235 * c-decl.c (merge_decls): Use set_decl_section_name.
5236 (duplicate_decls): Remove node if it exists.
5237
9bac5cbb
G
52382014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5239
5240 PR c/53119
5241 * c-typeck.c (push_init_level, process_init_element,
5242 pop_init_level): Correct check for zero initialization, move
5243 missing brace warning to respect zero initialization.
5244
8ffcdea8
MP
52452014-06-05 Marek Polacek <polacek@redhat.com>
5246
5247 PR c/56724
5248 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5249
742938c9
MP
52502014-06-05 Marek Polacek <polacek@redhat.com>
5251
5252 PR c/49706
5253 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5254 on the left hand side operand of a comparison.
742938c9 5255
6447c55d
MP
52562014-06-05 Marek Polacek <polacek@redhat.com>
5257
5258 PR c/48062
5259 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5260 Print note only if the warning was printed.
5261
9dc7743c
IZ
52622014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5263
5264 PR c/58942
5265 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5266 with a pointer.
5267
fedfecef
MP
52682014-06-03 Marek Polacek <polacek@redhat.com>
5269
5270 PR c/60439
5271 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5272 c_start_case.
5273 * c-tree.h (c_start_case): Update.
5274 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5275 switch condition has boolean value.
5276
9b2b7279
AM
52772014-06-02 Andrew MacLeod <amacleod@redhat.com>
5278
5279 * c-decl.c: Include builtins.h.
5280 * c-parser.c: Likewise.
5281
5c1bc275
MP
52822014-05-27 Marek Polacek <polacek@redhat.com>
5283
5284 PR c/56724
5285 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5286 error and warning calls to error_at and warning_at. Pass location of
5287 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5288 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5289 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5290
97563bc8
IZ
52912014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5292
5293 PR c/61191
5294 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5295 function parameters.
5296
aede2c10
JH
52972014-05-23 Jan Hubicka <hubicka@ucw.cz>
5298
5299 * c-decl.c (merge_decls): Preserve symtab node pointers.
5300 (duplicate_decls): Free new decl.
5301
edbba2ce
TS
53022014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5303
f3316c6d
TS
5304 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5305 initialization.
5306
edbba2ce
TS
5307 * c-parser.c (c_parser_omp_target): Return bool values.
5308
68c81f24
TS
53092014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5310
5311 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5312 num_teams_loc variable to num_thread_limit_loc.
5313
632f2871
RS
53142014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5315
5316 * c-array-notation.c (expand_array_notations): Use void_node
5317 instead of void_zero_node.
5318
766090c2
TS
53192014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5320
5321 * c-decl.c (finish_struct): Adjust.
5322 (finish_enum): Likewise.
5323 (bind): Adjust.
5324 (record_inline_static): Likewise.
5325 (push_scope): Likewise.
5326 (make_label): Likewise.
5327 (lookup_label_for_goto): Likewise.
5328 (finish_struct): Likewise.
5329 (finish_enum): Likewise.
5330 (store_parm_decls): Likewise.
5331 (c_push_function_context): Likewise.
5332 * c-lang.h: Remove usage of variable_size gty attribute.
5333 * c-parser.c (c_parse_init): Adjust.
5334 (c_parse_file): Likewise.
5335
2b107f6b
MP
53362014-05-13 Marek Polacek <polacek@redhat.com>
5337
5338 PR c/61162
5339 * c-typeck.c (convert_for_assignment): Pass location to
5340 WARN_FOR_ASSIGNMENT instead of input_location.
5341
d033409e
MP
53422014-05-10 Marek Polacek <polacek@redhat.com>
5343
5344 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5345 maybe_warn_string_init.
5346 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5347 maybe_warn_string_init.
5348 * c-tree.h (maybe_warn_string_init): Update declaration.
5349 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5350 Call pedwarn_init with loc instead of with input_location.
5351 (digest_init): Pass init_loc to maybe_warn_string_init.
5352 (pop_init_level): Call pedwarn_init with loc instead of with
5353 input_location.
5354 (set_init_index): Likewise.
5355 (process_init_element): Likewise.
5356
ea58ef42
MP
53572014-05-09 Marek Polacek <polacek@redhat.com>
5358
5359 PR c/61096
5360 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5361 (c_parser_initelt): Pass location to set_init_label. Pass array index
5362 location to set_init_index.
5363 * c-tree.h (push_init_level): Update declaration.
5364 (pop_init_level): Likewise.
5365 (set_init_index): Likewise.
5366 (set_init_label): Likewise.
5367 * c-typeck.c (error_init): Add location parameter. Call error_at
5368 instead of error.
5369 (digest_init): Pass init_loc to error_init.
5370 (really_start_incremental_init):
5371 (push_init_level): Add location parameter. Pass loc to pop_init_level
5372 and error_init.
5373 (pop_init_level): Likewise.
5374 (set_designator): Add location parameter. Pass loc to pop_init_level,
5375 push_init_level, and error_init.
5376 (set_init_index): Add location parameter. Pass loc to error_init and
5377 set_designator.
5378 (set_init_label): Likewise.
5379 (output_init_element): Pass loc to error_init.
5380 (process_init_element): Pass loc to error_init, pop_init_level,
5381 pedwarn_init, and push_init_level.
5382
661a0813
MP
53832014-05-09 Marek Polacek <polacek@redhat.com>
5384
5385 PR c/50459
5386 * c-parser.c (c_parser_attributes): Parse the arguments as an
5387 expression-list if the attribute takes identifier.
5388
2793eeab
MP
53892014-05-08 Marek Polacek <polacek@redhat.com>
5390
5391 PR c/61053
5392 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5393 TYPE_ALIGN_UNIT.
5394
f827930a
MP
53952014-05-08 Marek Polacek <polacek@redhat.com>
5396
5397 PR c/61077
5398 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5399 of main.
5400
1d60af08
KZ
54012014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5402 Mike Stump <mikestump@comcast.net>
5403 Richard Sandiford <rdsandiford@googlemail.com>
5404
5405 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5406 (finish_enum): Use wide-int interfaces.
5407 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5408 * c-typeck.c (build_c_cast): Likewise.
5409 (set_nonincremental_init_from_string): Likewise.
5410 (c_tree_equal): Likewise.
5411
a0e24419
MP
54122014-05-02 Marek Polacek <polacek@redhat.com>
5413
5414 PR c/25801
5415 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5416 Return size_one_node when the type is not complete.
5417 (pointer_diff): Remove comment.
5418 (build_unary_op): Improve error messages.
5419
19fc9faa
MP
54202014-05-02 Marek Polacek <polacek@redhat.com>
5421
5422 * c-typeck.c (c_finish_return): Separate warning_at calls.
5423
63bc4e87
MP
54242014-05-02 Marek Polacek <polacek@redhat.com>
5425
5426 * c-tree.h (error_init): Remove declaration.
5427 (pedwarn_init): Likewise.
5428 * c-typeck.c (error_init): Make static and move above.
5429 (pedwarn_init): Likewise.
5430 (warning_init): Move above.
5431 (maybe_warn_string_init): Likewise.
5432
4bd2511b
JL
54332014-05-01 Jeff Law <law@redhat.com>
5434
5435 Revert:
5436
5437 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5438 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5439 avoid goto.
5440
6a358dcb
MP
54412014-05-02 Marek Polacek <polacek@redhat.com>
5442
5443 PR c/60784
5444 * c-typeck.c (push_init_level): Set constructor_designated to
5445 p->designated for structures.
5446
ae5ebda4
MP
54472014-05-01 Marek Polacek <polacek@redhat.com>
5448
5449 PR c/60915
5450 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5451 function-definition has an attribute after the declarator.
5452
96b40f8d
MP
54532014-05-01 Marek Polacek <polacek@redhat.com>
5454
5455 PR c/60257
5456 * c-typeck.c (warning_init): Add location_t parameter. Call
5457 warning_at instead of warning.
5458 (push_init_level): Pass input_location to warning_init.
5459 (add_pending_init): Add location_t parameter. Pass loc to
5460 warning_init.
5461 (set_nonincremental_init): Pass input_location to add_pending_init.
5462 (set_nonincremental_init_from_string): Likewise.
5463 (output_init_element): Pass loc to warning_init and to
5464 add_pending_init.
5465
32e00768
MP
54662014-05-01 Marek Polacek <polacek@redhat.com>
5467
5468 PR c/43395
5469 * c-typeck.c (c_finish_return): Distinguish between label and variable
5470 when warning about returning local address.
5471
c9379ce2
MP
54722014-05-01 Marek Polacek <polacek@redhat.com>
5473
5474 PR c/29467
5475 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5476 in C89 mode.
5477
d00887e8
MP
54782014-05-01 Marek Polacek <polacek@redhat.com>
5479
5480 PR c/43245
5481 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5482 instead of 0 to WARN_FOR_QUALIFIERS.
5483
5436fa2e
MP
54842014-05-01 Marek Polacek <polacek@redhat.com>
5485
5486 PR c/56989
5487 * c-typeck.c (default_conversion): Use better location for
5488 error call.
5489
f8ed5150
MP
54902014-04-30 Marek Polacek <polacek@redhat.com>
5491
5492 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5493 also when SANITIZE_FLOAT_DIVIDE is on.
5494
8337d1db
MP
54952014-04-30 Marek Polacek <polacek@redhat.com>
5496
5497 PR c/60139
5498 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5499 and pedwarn_init. Use loc insted of input_location.
5500
c4bdc42f
MP
55012014-04-30 Marek Polacek <polacek@redhat.com>
5502
5503 PR c/60351
5504 * c-typeck.c (build_binary_op): Use location when warning about
5505 shift count.
5506
45484dcf
MP
55072014-04-25 Marek Polacek <polacek@redhat.com>
5508
5509 PR c/18079
5510 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5511 always_inline/noinline and hot/cold attributes.
5512
34cf811f
MP
55132014-04-25 Marek Polacek <polacek@redhat.com>
5514
5515 PR c/60114
5516 * c-parser.c (c_parser_initelt): Pass input_location to
5517 process_init_element.
5518 (c_parser_initval): Pass loc to process_init_element.
5519 * c-tree.h (process_init_element): Adjust declaration.
5520 * c-typeck.c (push_init_level): Pass input_location to
5521 process_init_element.
5522 (pop_init_level): Likewise.
5523 (set_designator): Likewise.
5524 (output_init_element): Add location_t parameter. Pass loc to
5525 digest_init.
5526 (output_pending_init_elements): Pass input_location to
5527 output_init_element.
5528 (process_init_element): Add location_t parameter. Pass loc to
5529 output_init_element.
5530
42056eac
JJ
55312014-04-24 Jakub Jelinek <jakub@redhat.com>
5532
5533 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5534 atomic-clause, allow comma in between atomic-clause and
5535 seq_cst.
5536
e162a134
JJ
55372014-04-22 Jakub Jelinek <jakub@redhat.com>
5538
5539 PR c/59073
5540 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5541 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5542
2f6babac
IZ
55432014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5544
5545 PR middle-end/60469
5546 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5547 create_tmp_var instead build_decl for creating temps.
5548 (build_array_notation_expr): Likewise.
5549 (fix_conditional_array_notations_1): Likewise.
5550 (fix_array_notation_expr): Likewise.
5551 (fix_array_notation_call_expr): Likewise.
5552
8edbfaa6
JJ
55532014-03-28 Jakub Jelinek <jakub@redhat.com>
5554
5555 PR c++/60689
5556 * c-tree.h (c_build_function_call_vec): New prototype.
5557 * c-typeck.c (build_function_call_vec): Don't call
5558 resolve_overloaded_builtin here.
5559 (c_build_function_call_vec): New wrapper function around
5560 build_function_call_vec. Call resolve_overloaded_builtin here.
5561 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5562 Call c_build_function_call_vec instead of build_function_call_vec.
5563 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5564 * c-decl.c (finish_decl): Likewise.
5565
7485aeea
MLI
55662014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5567
5568 PR c/55383
5569 * c-typeck.c: Use correct format string in cast-qual warning
5570
b17a8b07
TS
55712014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5572
5573 * c-decl.c (c_decl_attributes): Use
5574 lang_hooks.types.omp_mappable_type.
5575 * c-typeck.c (c_finish_omp_clauses): Likewise.
5576
3af9c5e9
MP
55772014-03-06 Marek Polacek <polacek@redhat.com>
5578
5579 PR c/60197
5580 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5581 of checking tree code.
5582
1c9f5f33
PK
55832014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5584
5585 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5586 (c_parser_parameter_declaration): Likewise.
5587
cc28fc7f
MP
55882014-02-19 Marek Polacek <polacek@redhat.com>
5589
5590 PR c/60195
5591 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5592 Call mark_exp_read on exp.value.
5593 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5594 TREE_ADDRESSABLE on old instead of val.
5595 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5596
b581c05c
PK
55972014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5598
5599 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5600 C_EXPR_APPEND by vec_safe_push.
5601 * c-tree.h (C_EXPR_APPEND): Remove.
5602
81e5eca8
MP
56032014-01-31 Marek Polacek <polacek@redhat.com>
5604
5605 PR c/59963
5606 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5607 build_function_call_vec.
5608 (build_function_call): Likewise.
5609 (build_atomic_assign): Likewise.
5610 (build_function_call_vec): Add arg_loc parameter. Use it.
5611 (convert_arguments): Likewise.
5612 (convert_for_assignment): Rename rhs_loc to expr_loc.
5613 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5614 (c_parser_objc_keywordexpr): Likewise.
5615 (c_parser_postfix_expression_after_primary): Call
5616 build_function_call_vec with expr_loc rather than op_loc.
5617 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5618 build_function_call_vec.
5619 (c_parser_expr_list): Add locations parameter. Fill it with locations
5620 of function arguments.
5621 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5622
68fca595
MP
56232014-01-30 Marek Polacek <polacek@redhat.com>
5624
5625 PR c/59940
5626 * c-typeck.c (build_function_call_vec): Use loc parameter.
5627 (convert_arguments): Add location parameter. Use it.
5628 (ep_convert_and_check): Likewise.
5629 (build_atomic_assign): Adjust convert_for_assignment call.
5630 (build_modify_expr): Likewise.
5631 (digest_init): Likewise.
5632 (c_finish_return): Likewise.
5633 (build_conditional_expr): Adjust ep_convert_and_check calls.
5634 (convert_for_assignment): Add rhs_loc parameter. Use it.
5635 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5636 calls.
5637
fa337f3a
RB
56382014-01-30 Richard Biener <rguenther@suse.de>
5639
5640 PR c/59905
5641 * c-typeck.c (build_function_call_vec): Do not replace calls
5642 to a function via an incompatible type with a runtime abort.
5643
b72271b9
BI
56442014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5645
5646 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5647 flag_enable_cilkplus with flag_cilkplus.
5648 (c_parser_direct_declarator_inner): Likewise.
5649 (c_parser_attribute_any_word): Likewise.
5650 (c_parser_attributes): Likewise.
5651 (c_parser_compound_statement): Likewise.
5652 (c_parser_statement_after_labels): Likewise.
5653 (c_parser_if_statement): Likewise.
5654 (c_parser_switch_statement): Likewise.
5655 (c_parser_do_statement): Likewise.
5656 (c_parser_for_statement): Likewise.
5657 (c_parser_unary_expression): Likewise.
5658 (c_parser_postfix_expression): Likewise.
5659 (c_parser_postfix_expression_after_primary): Likewise.
5660 (c_parser_postfix_expression_after_primary): Likewise.
5661 (c_parser_omp_clause_name): Likewise.
5662 (c_finish_omp_declare_simd): Likewise.
5663 (c_parser_cilk_verify_simd): Likewise.
5664 * c-typeck.c (build_array_ref): Likewise.
5665 (build_function_call_vec): Likewise.
5666 (convert_arguments): Likewise.
5667 (build_compound_expr): Likewise.
5668 (c_finish_return): Likewise.
5669 (c_finish_if_stmt): Likewise.
5670 (c_finish_loop): Likewise.
5671 (build_binary_op): Likewise.
5672
393e8e8b
MP
56732014-01-23 Marek Polacek <polacek@redhat.com>
5674
5675 PR c/59846
5676 * c-typeck.c (parser_build_binary_op): Use location instead of
5677 input_location.
5678 (build_binary_op): Pass location to shorten_compare.
5679
f04dda30
MP
56802014-01-23 Marek Polacek <polacek@redhat.com>
5681
5682 PR c/58346
5683 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5684 an empty aggregate.
5685
789eadcd
MP
56862014-01-23 Marek Polacek <polacek@redhat.com>
5687
5688 PR c/59871
5689 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5690 of a comma expression.
5691 (emit_side_effect_warnings): Likewise.
5692
40f14e9f
BI
56932014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5694
5695 PR c/59825
5696 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5697 function to use walk_tree and moved a lot of its functionality to
5698 expand_array_notations.
5699 (expand_array_notations): New function.
5700
74558dd9
BI
57012014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5702
5703 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5704 attribute an attribute without value.
5705
652fea39
JJ
57062014-01-23 Jakub Jelinek <jakub@redhat.com>
5707
5708 PR middle-end/58809
5709 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5710 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5711
f34f1c87
MP
57122014-01-22 Marek Polacek <polacek@redhat.com>
5713
5714 PR c/59891
5715 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5716 of remove_c_maybe_const_expr on op1 and op2.
5717
241f845a
JJ
57182014-01-15 Jakub Jelinek <jakub@redhat.com>
5719
5720 PR c/58943
5721 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5722 effects, preevaluate rhs using SAVE_EXPR first.
5723
9a74f20c
BI
57242014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5725
5726 PR c++/59631
5727 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5728 statements with if-elseif statements.
5729
96066ce1
MP
57302014-01-06 Marek Polacek <polacek@redhat.com>
5731
5732 PR c/57773
5733 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5734 defined bit-field types only in ISO C.
5735
23a5b65a
RS
57362014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5737
5738 Update copyright years
5739
f9030485
RS
57402014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5741
5742 * c-array-notation.c: Use the standard form for the copyright notice.
5743
41958c28
BI
57442013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5745
5746 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5747 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5748 field in parser is not empty. If not-empty, call the function
5749 c_parser_finish_omp_declare_simd.
5750 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5751 between SIMD-enabled functions and #pragma simd. Added new parameter.
5752 (c_parser_cilk_all_clauses): Modified the usage of the function
5753 c_parser_cilk_clause_vectorlength as mentioned above.
5754 (c_parser_cilk_simd_fn_vector_attrs): New function.
5755 (c_finish_cilk_simd_fn_tokens): Likewise.
5756 (is_cilkplus_vector_p): Likewise.
5757 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5758 "nomask," and "mask" strings in clause name.
5759 (c_parser_omp_all_clauses): Added 3 new case statements:
5760 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5761 PRAGMA_CILK_CLAUSE_NOMASK.
5762 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5763 check for vector attribute and if so call the function
5764 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5765 called the function c_finish_cilk_simd_fn_tokens.
5766 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5767 parser field is non-empty. If so, parse them as you would parse
5768 the omp declare simd pragma.
5769 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5770 Added a check when step is a parameter and flag it as error.
5771 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5772 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5773 pragma_omp_clause.
5774
cef0fd0e
TS
57752013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5776
5777 * c-parser.c (c_parser_omp_parallel): Fix description.
5778
12893402
BI
57792013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5780
5781 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5782 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5783 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5784 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5785
296674db
JM
57862013-12-04 Joseph Myers <joseph@codesourcery.com>
5787
5788 PR c/52023
5789 * c-parser.c (c_parser_alignas_specifier): Use
5790 c_sizeof_or_alignof_type instead of c_alignof.
5791 (c_parser_alignof_expression): Likewise, with min_alignof
5792 parameter depending on alignof spelling used.
5793
edd28054
MP
57942013-12-04 Marek Polacek <polacek@redhat.com>
5795
5796 PR c/54113
5797 * c-decl.c (start_function): Don't warn for missing prototype for
5798 inline functions.
5799
da0fc454
MP
58002013-12-03 Marek Polacek <polacek@redhat.com>
5801
5802 PR c/59351
5803 * c-decl.c (build_compound_literal): Allow compound literals with
5804 empty initial value.
5805
4c2ecab0
JM
58062013-12-02 Joseph Myers <joseph@codesourcery.com>
5807
5808 PR c/58235
5809 * c-typeck.c (build_modify_expr): Diagnose assignment to
5810 expression with array type.
5811
340baef7
JM
58122013-11-29 Joseph Myers <joseph@codesourcery.com>
5813
5814 PR c/42262
5815 * c-typeck.c (process_init_element): Do not treat a string as
5816 initializing a whole array when used with a designator for an
5817 individual element.
5818
6763b9f7
JM
58192013-11-29 Joseph Myers <joseph@codesourcery.com>
5820
5821 PR c/57574
5822 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5823 an inline function following a static declaration.
5824
e7bd1de1
JJ
58252013-11-28 Jakub Jelinek <jakub@redhat.com>
5826
5827 PR c/59310
5828 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5829 to p_name before calling c_parser_omp_teams instead of after.
5830 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5831 argument. Remove unused p_name variable.
5832
0136f8f0
AH
58332013-11-27 Aldy Hernandez <aldyh@redhat.com>
5834 Jakub Jelinek <jakub@redhat.com>
5835
5836 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5837 external_scope is NULL.
5838
241b71bb
TV
58392013-11-27 Tom de Vries <tom@codesourcery.com>
5840 Marc Glisse <marc.glisse@inria.fr>
5841
5842 PR c++/59032
5843 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5844
2fb9a547
AM
58452013-11-22 Andrew MacLeod <amacleod@redhat.com>
5846
5847 * c-typeck.c: Add required include files from gimple.h.
5848
8400e75e
DM
58492013-11-22 David Malcolm <dmalcolm@redhat.com>
5850
5851 * c-decl.c (define_label, shadow_tag_warned)
5852 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5853 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5854 (declspecs_add_type): Remove use of in_system_header macro.
5855 * c-parser.c (c_parser_unary_expression): Likewise.
5856 * c-typeck.c (store_init_value, process_init_element)
5857 (c_start_case): Likewise.
5858
5859 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5860 macro.
5861
5862 * c-parser.c (c_parser_set_source_position_from_token): Remove
5863 reference to in_system_header from comment.
5864
386b1f1f
RS
58652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5866
5867 * c-decl.c (grokdeclarator): Update comment to refer to
5868 tree_to_[su]hwi rather than tree_low_cst.
5869
ae7e9ddd
RS
58702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5871
5872 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5873 tree_to_uhwi throughout.
5874
9439e9a1
RS
58752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5876
5877 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5878 throughout.
5879
9541ffee
RS
58802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5881
5882 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5883 throughout.
5884
c02065fc
AH
58852013-11-15 Aldy Hernandez <aldyh@redhat.com>
5886
5887 * c-parser.c (c_parser_cilk_simd): New.
5888 (c_parser_cilk_verify_simd): New.
5889 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5890 (c_parser_omp_for_loop): Add case for NE_EXPR.
5891 Set c_break_label for CILK_SIMD.
5892 (c_parser_cilk_clause_vectorlength): New.
5893 (c_parser_cilk_clause_linear): New.
5894 (c_parser_cilk_clause_name): New.
5895 (c_parser_cilk_all_clauses): New.
5896 * c-typeck.c (build_unary_op): Pass location argument to
5897 readonly_error.
5898 (build_modify_expr): Same.
5899 (build_asm_expr): Same.
5900 (c_finish_bc_stmt): Error on break/continue in loops.
5901
18f429e2
AM
59022013-11-14 Andrew MacLeod <amacleod@redhat.com>
5903
5904 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5905
d8a2d370
DN
59062013-11-14 Diego Novillo <dnovillo@google.com>
5907
5908 * c-decl.c: Include print-tree.h.
5909 Include stor-layout.h.
5910 Include varasm.h.
5911 Include attribs.h.
5912 Include stringpool.h.
5913 * c-lang.c: Include fold-const.h.
5914 * c-parser.c: Include stringpool.h.
5915 Include attribs.h.
5916 Include stor-layout.h.
5917 Include varasm.h.
5918 Include trans-mem.h.
5919 * c-typeck.c: Include stor-layout.h.
5920 Include trans-mem.h.
5921 Include varasm.h.
5922 Include stmt.h.
5923
38b7bc7f
JM
59242013-11-13 Joseph Myers <joseph@codesourcery.com>
5925
5926 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5927 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5928 __auto_type.
5929 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5930 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5931 RID_AUTO_TYPE.
5932 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5933 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5934 (c_parser_declarator, c_parser_direct_declarator_inner)
5935 (c_parser_parameter_declaration, c_parser_type_name): All callers
5936 changed.
5937 (c_parser_declaration_or_fndef): Handle declarations with type
5938 determined from the initializer.
5939
45b0be94
AM
59402013-11-12 Andrew MacLeod <amacleod@redhat.com>
5941
18f429e2 5942 * c-typeck.c: Include gimplify.h.
45b0be94 5943
582d9b50
JM
59442013-11-12 Joseph Myers <joseph@codesourcery.com>
5945
5946 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5947 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5948 comment.
5949 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5950 or _Thread_local as appropriate in diagnostics.
5951 (build_null_declspecs): Initialize ret->thread_gnu_p.
5952 (declspecs_add_scspec): Handle either __thread or _Thread_local
5953 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5954 pedantic. Do not disallow _Thread_local extern and _Thread_local
5955 static.
5956
267bac10
JM
59572013-11-07 Joseph Myers <joseph@codesourcery.com>
5958 Andrew MacLeod <amacleod@redhat.com>
5959
5960 * c-aux-info.c (gen_type): Handle atomic qualifier.
5961 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5962 qualifiers when compating types.
5963 (shadow_tag_warned): Handle atomic_p in declspecs.
5964 (quals_from_declspecs): Likewise.
5965 (start_decl): Use c_type_promotes_to when promoting argument
5966 types.
5967 (grokdeclarator): Handle _Atomic.
5968 (get_parm_info): Diagnose any qualifier on "void" as only
5969 parameter.
5970 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5971 comparing types. Use c_type_promotes_to when promoting argument
5972 types.
5973 (finish_function): Use c_type_promotes_to when promoting argument
5974 types.
5975 (build_null_declspecs): Handle atomic_p in declspecs.
5976 (declspecs_add_qual): Handle RID_ATOMIC.
5977 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5978 (c_token_starts_declspecs): Handle RID_ATOMIC.
5979 (c_parser_declspecs): Handle atomic type specifiers and
5980 qualifiers.
5981 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5982 from types of expressions with atomic type.
5983 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5984 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5985 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5986 (c_parser_statement_after_labels, c_parser_switch_statement)
5987 (c_parser_for_statement, c_parser_expr_no_commas)
5988 (c_parser_conditional_expression, c_parser_binary_expression)
5989 (c_parser_cast_expression, c_parser_unary_expression)
5990 (c_parser_postfix_expression)
5991 (c_parser_postfix_expression_after_primary, c_parser_expression):
5992 Use convert_lvalue_to_rvalue.
5993 (c_parser_expression_conv, c_parser_expr_list): Document
5994 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5995 (c_parser_objc_synchronized_statement): Use
5996 convert_lvalue_to_rvalue.
5997 (c_parser_objc_selector): Handle RID_ATOMIC.
5998 (c_parser_objc_receiver, c_parser_array_notation): Use
5999 convert_lvalue_to_rvalue.
6000 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6001 _Atomic (type-name).
6002 (struct c_declspecs): Add atomic_p field.
6003 (convert_lvalue_to_rvalue): Declare.
6004 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6005 corresponding atomic types.
6006 (qualify_type): Don't add _Atomic qualifiers from second argument.
6007 (comp_target_types): Do not allow _Atomic mismatches.
6008 (type_lists_compatible_p): Do not remove atomic qualifiers when
6009 comparing types.
6010 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6011 (build_atomic_assign): New functions.
6012 (build_unary_op): Use build_atomic_assign for atomic increment and
6013 decrement.
6014 (build_conditional_expr): Do not treat _Atomic void as a qualified
6015 version of void.
6016 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6017 (find_anonymous_field_with_type, convert_to_anonymous_field)
6018 (convert_for_assignment): Do not remove atomic qualifiers when
6019 comparing types.
6020 (digest_init): Do not accept initialization of arrays of atomic
6021 elements by string constants.
6022 (build_asm_expr): Use convert_lvalue_to_rvalue.
6023 (build_binary_op): Do not treat _Atomic void as a qualified
6024 version of void.
6025
0c249d4b
DD
60262013-11-06 DJ Delorie <dj@redhat.com>
6027
6028 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6029 both explicit and builtin, print the location of the explicit one.
6030
6d7f7e0a
TB
60312013-11-05 Tobias Burnus <burnus@net-b.de>
6032
6033 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6034 c_parser_omp_distribute, c_parser_omp_teams,
6035 c_parser_omp_target, c_parser_omp_declare): Handle
6036 -fopenmp-simd.
6037
b906f4ca
MP
60382013-11-03 Marek Polacek <polacek@redhat.com>
6039
6040 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6041
ee1d5a02
JJ
60422013-11-01 Jakub Jelinek <jakub@redhat.com>
6043
6044 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6045 check_dup_generic at the end, unless remove is true.
6046 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6047 remove = true;.
6048 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6049
5a9785fb
JJ
60502013-10-31 Jakub Jelinek <jakub@redhat.com>
6051
6052 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6053 with decl that is not pointer nor array.
6054
939b37da
BI
60552013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6056
6057 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6058 a spawning function is found.
6059 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6060 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6061 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6062 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6063 case.
6064 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6065 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6066 expr.
6067 (c_finish_return): Added a check to reject _Cilk_spawn in return
6068 expression.
6069 (build_cilk_spawn): New function.
6070 (build_cilk_sync): Likewise.
6071 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6072
d4af74d4
TB
60732013-10-27 Tobias Burnus <burnus@net-b.de>
6074
6075 PR other/33426
6076 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6077 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6078 (c_parser_statement_after_labels): Update calls.
6079
d73749df 60802013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6081
6082 PR other/33426
6083 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6084 Handle PRAGMA_IVDEP.
6085 (c_parser_statement_after_labels): Update call.
6086
f28aa681
MP
60872013-10-24 Marek Polacek <polacek@redhat.com>
6088
6089 * c-parser.c (c_parser_struct_declaration): Add a comment.
6090 (c_parser_declarator): Don't allow _Alignas here.
6091
0645c1a2
AM
60922013-10-17 Andrew MacLeod <amacleod@redhat.com>
6093
6094 * c-parser.c: Include omp-low.h.
6095 * c-typeck.c: Likewise.
6096
568a31f2
MP
60972013-10-17 Marek Polacek <polacek@redhat.com>
6098
6099 PR c/58267
6100 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6101 Document syntax of the array-declarator.
6102 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6103 are not permitted.
6104 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6105 (c_parser_struct_declaration): Likewise.
6106 (c_parser_declarator): Likewise.
6107 (c_parser_direct_declarator_inner): Likewise.
6108 (c_parser_parameter_declaration): Likewise.
6109 (c_parser_type_name): Likewise.
6110
acf0174b
JJ
61112013-10-11 Jakub Jelinek <jakub@redhat.com>
6112
6113 * c-lang.h (current_omp_declare_target_attribute): New extern
6114 decl.
6115 * c-parser.c: Include c-lang.h.
6116 (struct c_parser): Change tokens to c_token *.
6117 Add tokens_buf field. Change tokens_avail type to unsigned int.
6118 (c_parser_consume_token): If parser->tokens isn't
6119 &parser->tokens_buf[0], increment parser->tokens.
6120 (c_parser_consume_pragma): Likewise.
6121 (enum pragma_context): Add pragma_struct and pragma_param.
6122 (c_parser_external_declaration): Adjust
6123 c_parser_declaration_or_fndef caller.
6124 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6125 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6126 Adjust recursive call.
6127 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6128 of pragma_external.
6129 (c_parser_parameter_declaration): Use pragma_param instead of
6130 pragma_external.
6131 (c_parser_compound_statement_nostart, c_parser_label,
6132 c_parser_for_statement): Adjust
6133 c_parser_declaration_or_fndef callers.
6134 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6135 it through to c_parser_conditional_expression.
6136 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6137 pass it through to c_parser_binary_expression. Adjust recursive
6138 call.
6139 (c_parser_binary_expression): Remove prec argument, add
6140 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6141 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6142 binop matches it, use build2 instead of parser_build_binary_op.
6143 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6144 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6145 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6146 Handle pragma_struct and pragma_param the same as pragma_external.
6147 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6148 (c_parser_omp_variable_list): Parse array sections for
6149 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6150 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6151 (c_parser_omp_clause_reduction): Handle user defined reductions.
6152 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6153 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6154 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6155 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6156 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6157 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6158 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6159 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6160 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6161 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6162 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6163 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6164 (c_parser_omp_for_loop): Add CODE argument, pass it through
6165 to c_finish_omp_for. Change last argument to cclauses,
6166 and adjust uses to grab parallel clauses from the array of all
6167 the split clauses. Adjust c_parser_binary_expression,
6168 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6169 (omp_split_clauses): New function.
6170 (c_parser_omp_simd): New function.
6171 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6172 Allow the function to be called also when parsing combined constructs,
6173 and call c_parser_omp_simd when parsing for simd.
6174 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6175 #pragma omp section, require exactly one structured-block instead of
6176 sequence of statements.
6177 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6178 Allow the function to be called also when parsing combined constructs.
6179 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6180 Allow the function to be called also when parsing combined
6181 constructs.
6182 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6183 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6184 c_parser_omp_teams, c_parser_omp_target_data,
6185 c_parser_omp_target_update, c_parser_omp_target,
6186 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6187 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6188 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6189 (c_parser_omp_construct): Add p_name and mask vars. Handle
6190 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6191 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6192 and c_parser_omp_sections callers.
6193 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6194 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6195 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6196 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6197 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6198 OMP_CLAUSE_DEPEND.
6199 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6200 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6201 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6202 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6203 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6204 * c-typeck.c: Include tree-inline.h.
6205 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6206 handle_omp_array_sections_1, handle_omp_array_sections,
6207 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6208 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6209 user defined reductions.
6210 (c_tree_equal): New function.
6211 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6212 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6213 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6214 c_check_omp_declare_reduction_r): New prototypes.
6215 * c-decl.c (current_omp_declare_target_attribute): New variable.
6216 (c_decl_attributes): New function.
6217 (start_decl, start_function): Use it instead of decl_attributes.
6218 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6219 c_omp_reduction_decl, c_omp_reduction_lookup,
6220 c_check_omp_declare_reduction_r): New functions.
6221
0a6c2227
TT
62222013-09-25 Tom Tromey <tromey@redhat.com>
6223
6224 * Make-lang.in (c/gccspec.o): Remove.
6225 (CFLAGS-c/gccspec.o): New variable.
6226 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6227 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6228 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6229
f3bc55f0
TT
62302013-09-25 Tom Tromey <tromey@redhat.com>
6231
6232 * Make-lang.in (c/gccspec.o): Don't use subshell.
6233
a24d975c
MP
62342013-09-18 Marek Polacek <polacek@redhat.com>
6235
6236 PR sanitize/58443
6237 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6238 Remove unnecessary check.
6239
ce6923c5
MP
62402013-09-18 Marek Polacek <polacek@redhat.com>
6241
6242 PR sanitizer/58411
6243 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6244 no_sanitize_undefined attribute.
6245
a1e51df9
KT
62462013-09-13 Kai Tietz <ktietz@redhat.com>
6247
6248 PR target/57848
6249 * c-decl.c (c_builtin_function_ext_scope): Remove
6250 wrong assumption that it is never called on prexisting
6251 symbol.
6252
0af94e6f
JR
62532013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6254
6255 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6256
20059c8b
GDR
62572013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6258
6259 * c-objc-common.c (c_tree_printer): Tidy.
6260
de5a5fa1
MP
62612013-08-30 Marek Polacek <polacek@redhat.com>
6262
6263 * c-typeck.c (build_binary_op): Add division by zero and shift
6264 instrumentation.
6265
2531a1d9 62662013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6267 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6268
6e2bcc98 6269 PR c/35649
2531a1d9
JR
6270 * c-typeck.c (c_common_type): Prefer double_type_node over
6271 other REAL_TYPE types with the same precision.
6272 (convert_arguments): Likewise.
6273
025311c4
GDR
62742013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6275
6276 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6277 (c_initialize_diagnostics): Call a destructor for the early printer.
6278
da6ca2b5
GDR
62792013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6280
6281 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6282 printer initialization.
6283
318cda85 62842013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6285
318cda85
BI
6286 PR c/57490
6287 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6288 check for truth values.
6289 (expand_array_notation_exprs): Added truth values case. Removed an
6290 unwanted else. Added for-loop to walk through subtrees in default
6291 case.
6292
b066401f
GDR
62932013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6294
6295 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6296
fb48aadc
JM
62972013-07-23 Joseph Myers <joseph@codesourcery.com>
6298
6299 * c-parser.c (struct c_generic_association): Fix typo.
6300
433cc7b0
TT
63012013-07-23 Tom Tromey <tromey@redhat.com>
6302 Joseph Myers <joseph@codesourcery.com>
6303
6304 * c-parser.c (struct c_generic_association): New.
6305 (c_generic_association_d): New typedef.
6306 (c_parser_generic_selection): New function.
6307 (c_parser_postfix_expression): Handle RID_GENERIC.
6308
26d40c3d
JM
63092013-07-13 Jason Merrill <jason@redhat.com>
6310
6311 PR c++/57793
6312 * c-decl.c (finish_struct): Check for too-large class.
6313
ecdbd01a 63142013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6315
6316 PR c/57821
6317 * c-typeck.c (set_init_index): When folding, check for index overflow.
6318
1141ed3f
BI
63192013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6320
6321 * c-parser.c (c_parser_array_notation): Removed rejection of array
6322 notations in an array of function pointers.
6323
713b46fa
BI
63242013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6325
6326 * c-array-notation.c (make_triplet_val_inv): New function.
6327 (create_cmp_incr): Likewise.
6328 (create_array_refs): Likewise.
6329 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6330 Also modularized common parts between functions and called the function.
6331 (build_array_notation_expr): Likewise.
6332 (fix_conditional_array_notations_1): Likewise.
6333 (fix_array_notation_expr): Likewise.
6334 (fix_array_notation_call_expr): Likewise.
6335
92f20202
MP
63362013-06-18 Marek Polacek <polacek@redhat.com>
6337
6338 PR c/57630
6339 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6340
73a23b06
BI
63412013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6342
6343 * c-array-notation.c (build_array_notation_expr): Reject array notation
6344 mismatch between LHS and RHS even inside a call_expr. Also, removed
6345 a couple while statements that were dead code.
6346
00b8517d
BI
63472013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6348
6349 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6350 excessive precision expressions in function parameters. Also removed
6351 couple unwanted while statements.
6352
1509bdda
BI
63532013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6354
6355 * c-array-notation.c (expand_array_notation_exprs): Added
6356 ARRAY_NOTATION_REF case.
ab20d992 6357
d60f1706
BI
63582013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6359
6360 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6361 function to c-family/array-notation-common.c.
6362 (is_cilkplus_reduce_builtin): Likewise.
6363 (find_rank): Likewise.
6364 (extract_array_notation_exprs): Likewise.
6365 (replace_array_notations): Likewise.
6366 (find_inv_trees): Likewise.
6367 (replace_inv_trees): Likewise.
6368 (contains_array_notation_expr): Likewise.
6369 (find_correct_array_notation_type): Likewise.
6370 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6371 (struct inv_list): Moved this to c-family/array-notation-common.c.
6372 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6373
6d6efbb3
BI
63742013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6375
6376 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6377 reduction functions outside the for-loop. Added a check if the fundecl
6378 is non-NULL. Finally, removed an unwanted if-statement, and made the
6379 body unconditional.
6380
25c22937
BI
63812013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6382
6383 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6384 condition of the if-statement matches the rank of else-block and then-
6385 block when array notations are used.
6386 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6387 expression after the entire function body is parsed.
6388 (c_parser_expr_no_commas): Delayed creating array notation expressions
6389 to the end of function parsing.
6390 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6391 whole if-statement instead of just the condition.
ab20d992 6392 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6393
edd25645
BI
63942013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6395
6396 PR c/57474
6397 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6398 array to NULL_TREE if they are unused. Also added a check for the
6399 field to be NULL before its fields are used in future.
ab20d992 6400
065ce7f1
RO
64012013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6402
6403 PR bootstrap/57450
6404 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6405 (build_array_notation_expr): Likewise.
6406
36536d79
BI
64072013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6408
6409 * c-typeck.c (build_array_ref): Added a check to see if array's
6410 index is greater than one. If true, then emit an error.
6411 (build_function_call_vec): Exclude error reporting and checking
6412 for builtin array-notation functions.
6413 (convert_arguments): Likewise.
6414 (c_finish_return): Added a check for array notations as a return
6415 expression. If true, then emit an error.
6416 (c_finish_loop): Added a check for array notations in a loop
6417 condition. If true then emit an error.
6418 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6419 (build_binary_op): Added a check for array notation expr inside
6420 op1 and op0. If present, we call another function to find correct
6421 type.
6422 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6423 * c-parser.c (c_parser_compound_statement): Check if array
6424 notation code is used in tree, if so, then transform them into
6425 appropriate C code.
6426 (c_parser_expr_no_commas): Check if array notation is used in LHS
6427 or RHS, if so, then build array notation expression instead of
6428 regular modify.
6429 (c_parser_postfix_expression_after_primary): Added a check for
6430 colon(s) after square braces, if so then handle it like an array
6431 notation. Also, break up array notations in unary op if found.
6432 (c_parser_direct_declarator_inner): Added a check for array
6433 notation.
6434 (c_parser_compound_statement): Added a check for array notation in
6435 a stmt. If one is present, then expand array notation expr.
6436 (c_parser_if_statement): Likewise.
6437 (c_parser_switch_statement): Added a check for array notations in
6438 a switch statement's condition. If true, then output an error.
6439 (c_parser_while_statement): Similarly, but for a while.
6440 (c_parser_do_statement): Similarly, but for a do-while.
6441 (c_parser_for_statement): Similarly, but for a for-loop.
6442 (c_parser_unary_expression): Check if array notation is used in a
6443 pre-increment or pre-decrement expression. If true, then expand
6444 them.
6445 (c_parser_array_notation): New function.
6446 * c-array-notation.c: New file.
6447 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6448
cd192ccc
MS
64492013-05-23 Mike Stump <mikestump@comcast.net>
6450
6451 * c-typeck.c (convert_for_assignment): Handle references to memory
6452 spaces better.
6453
427b248d
JM
64542013-05-16 Jason Merrill <jason@redhat.com>
6455
6456 * Make-lang.in (cc1$(exeext)): Use link mutex.
6457
44d90fe1
PC
64582013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6459
6460 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6461 to simply use OPT_Wpointer_arith.
6462 (build_unary_op): Likewise.
6463
4e7d7b3d
JJ
64642013-04-03 Jakub Jelinek <jakub@redhat.com>
6465
6466 PR c/19449
6467 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6468 argument. If set, or it temporarily for parsing of the first
6469 argument into force_folding_builtin_constant_p.
6470 (c_parser_postfix_expression): Adjust callers.
6471
839b422f
RB
64722013-03-21 Richard Biener <rguenther@suse.de>
6473
6474 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6475 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6476
2ee028f1
MP
64772013-02-12 Marek Polacek <polacek@redhat.com>
6478
6479 PR c/44938
6480 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6481 origtypes to NULL.
6482
8824edff
JJ
64832013-01-24 Jakub Jelinek <jakub@redhat.com>
6484
6485 PR c/56078
6486 * c-typeck.c (set_nonincremental_init_from_string): If
6487 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6488 returned false.
6489 (process_init_element): Likewise.
6490
eadd3d0d
JJ
64912012-12-20 Jakub Jelinek <jakub@redhat.com>
6492
6493 PR c++/55619
6494 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6495 argument, don't call default_function_array_conversion
6496 nor c_fully_fold here.
6497 (c_parser_asm_statement): Adjust callers.
6498 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6499 and outputs here, and call default_function_array_conversion
6500 on inputs that don't need to be addressable.
6501
f8a93a2e
JJ
65022012-12-18 Jakub Jelinek <jakub@redhat.com>
6503
6504 PR c/39464
6505 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6506 warning require that both c_common_unsigned_type as well as
6507 c_common_signed_type is the same for both mvl and mvr types.
6508
9771b263
DN
65092012-11-16 Diego Novillo <dnovillo@google.com>
6510
6511 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6512
6513 * c-common.c: Use new vec API in vec.h.
6514 * c-common.h: Likewise.
6515 * c-gimplify.c: Likewise.
6516 * c-pragma.c: Likewise.
6517 * c-pretty-print.c: Likewise.
6518 * c-pretty-print.h: Likewise.
6519 * c-semantics.c: Likewise.
6520 * c-decl.c: Likewise.
6521 * c-parser.c: Likewise.
6522 * c-tree.h: Likewise.
6523 * c-typeck.c: Likewise.
6524
880661a4
JW
65252012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6526
6527 PR c++/54930
6528 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6529
077d1abe
MLI
65302012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6531
6532 PR c/53066
6533 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6534 shadows a function, unless the variable is a function or a
6535 pointer-to-function.
6536
3a785c97
JJ
65372012-10-12 Jakub Jelinek <jakub@redhat.com>
6538
6539 PR c/54381
6540 * c-parser.c (struct c_tree_loc_pair): Removed.
6541 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6542 add location_t * and tree * arguments, fill in array of 3
6543 sizeof_arg trees and corresponding locs.
6544 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6545 c_parser_expr_list callers.
6546 (c_parser_postfix_expression_after_primary): Likewise. Pass
6547 array of 3 sizeof_arg trees and locs (corresponding to first
6548 3 arguments) to sizeof_pointer_memaccess_warning.
6549
703c8606
LC
65502012-10-09 Lawrence Crowl <crowl@google.com>
6551
6552 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6553 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6554 hash table.
6555
5d9de0d0
PC
65562012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6557
6558 PR c++/54194
6559 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6560 call.
6561
a212e43f
MG
65622012-10-09 Marc Glisse <marc.glisse@inria.fr>
6563
6564 PR c++/54427
6565 * c-typeck.c: Include c-common.h.
6566 (enum stv_conv): Moved to c-common.h.
6567 (scalar_to_vector): Moved to c-common.c.
6568 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6569 * Make-lang.in: c-typeck.c depends on c-common.h.
6570
3b78de56
AC
65712012-10-04 Arnaud Charlet <charlet@adacore.com>
6572
6573 * c-decl.c (c_write_global_declarations): Fix handling of
6574 -fdump-ada-spec*.
6575
78c60e3d
SS
65762012-09-30 Sharad Singhai <singhai@google.com>
6577
6578 * c-decl.c (c_write_global_declarations): Use a different method
6579 to determine if the dump has ben initialized.
6580
9f33203d
JM
65812012-09-14 Joseph Myers <joseph@codesourcery.com>
6582
6583 PR c/54552
6584 * c-typeck.c (c_cast_expr): When casting to a type requiring
6585 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6586 c_fully_fold first.
6587
a27d595d
JM
65882012-09-14 Joseph Myers <joseph@codesourcery.com>
6589
6590 PR c/54103
6591 * c-typeck.c (build_unary_op): Pass original argument of
6592 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6593 any C_MAYBE_CONST_EXPR, if it has integer operands.
6594 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6595 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6596 to c_objc_common_truthvalue_conversion, then remove any
6597 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6598 c_objc_common_truthvalue_conversion not
6599 c_common_truthvalue_conversion.
6600 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6601 call note_integer_operands for arguments with integer operands
6602 that are not integer constants.
6603
9feb29df
JJ
66042012-09-13 Jakub Jelinek <jakub@redhat.com>
6605
6606 PR c/54559
6607 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6608 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6609
d409320c
JJ
66102012-08-31 Jakub Jelinek <jakub@redhat.com>
6611
6612 PR c/54428
6613 * c-convert.c (convert): Don't call fold_convert_loc if
6614 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6615 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6616 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6617
6265d07c
JJ
66182012-08-24 Jakub Jelinek <jakub@redhat.com>
6619
6620 PR c/54355
6621 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6622 for nested and empty_ok arguments in the call to
6623 c_parser_declaration_or_fndef.
6624
1a4049e7
JJ
66252012-08-17 Jakub Jelinek <jakub@redhat.com>
6626
6627 * c-tree.h (c_last_sizeof_arg): Declare.
6628 * c-parser.c (struct c_tree_loc_pair): New type.
6629 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6630 non-NULL.
6631 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6632 (c_parser_postfix_expression_after_primary): Likewise. Call
6633 sizeof_pointer_memaccess_warning if needed.
6634 (sizeof_ptr_memacc_comptypes): New function.
6635 * c-typeck.c (c_last_sizeof_arg): New global variable.
6636 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6637
0229aee9
UB
66382012-07-24 Uros Bizjak <ubizjak@gmail.com>
6639
6640 * c-lang.h (lang_decl): Add variable_size GTY option.
6641
7ee2468b
SB
66422012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6643
6644 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6645 * Make-lang.in: Fix dependencies.
6646
d4a10d0a
SB
66472012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6648
6649 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6650 and add language Makefile hooks.
6651 * config-lang.in: New file.
6652 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6653 add the required "normal" config-lang.in rules.
6654 * c-lang.h: Moved from gcc/ to here.
6655 * c-tree.h: Likewise.
6656 * c-objc-common.c: Likewise.
6657 * c-objc-common.h: Likewise.
6658 * c-typeck.c: Likewise.
6659 * c-convert.c: Likewise.
6660 * c-lang.c: Likewise.
6661 * c-aux-info.c: Likewise.
6662 * c-errors.c: Likewise.
6663 * gccspec.c: Likewise.
6664 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6665 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6666\f
a5544970 6667Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6668
6669Copying and distribution of this file, with or without modification,
6670are permitted in any medium without royalty provided the copyright
6671notice and this notice are preserved.
This page took 2.634181 seconds and 5 git commands to generate.